chore: Error on missing ID in messages
This commit is contained in:
parent
0c09c3651b
commit
2e8abe1071
1 changed files with 3 additions and 3 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
use core::panic;
|
||||||
|
|
||||||
use axum::extract::State;
|
use axum::extract::State;
|
||||||
use conduwuit::{
|
use conduwuit::{
|
||||||
Err, Result, at,
|
Err, Result, at,
|
||||||
|
@ -132,8 +134,6 @@ pub(crate) async fn get_message_events_route(
|
||||||
.take(limit)
|
.take(limit)
|
||||||
.collect()
|
.collect()
|
||||||
.await;
|
.await;
|
||||||
// let appservice_id = body.appservice_info.map(|appservice|
|
|
||||||
// appservice.registration.id);
|
|
||||||
|
|
||||||
let lazy_loading_context = lazy_loading::Context {
|
let lazy_loading_context = lazy_loading::Context {
|
||||||
user_id: sender_user,
|
user_id: sender_user,
|
||||||
|
@ -143,7 +143,7 @@ pub(crate) async fn get_message_events_route(
|
||||||
if let Some(registration) = body.appservice_info.as_ref() {
|
if let Some(registration) = body.appservice_info.as_ref() {
|
||||||
<&DeviceId>::from(registration.registration.id.as_str())
|
<&DeviceId>::from(registration.registration.id.as_str())
|
||||||
} else {
|
} else {
|
||||||
<&DeviceId>::from("")
|
panic!("No device_id provided and no appservice registration found, this should be unreachable");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
room_id,
|
room_id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue