Fix start/end token swap left from dropped commits
parent
99220565d4
commit
c8d7d80eb2
|
@ -3243,8 +3243,8 @@ pub fn get_message_events_route(
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
Ok(get_message_events::Response {
|
Ok(get_message_events::Response {
|
||||||
start: start_token,
|
start: Some(body.from.clone()),
|
||||||
end: Some(body.from.clone()),
|
end: start_token,
|
||||||
chunk: events_before,
|
chunk: events_before,
|
||||||
state: Vec::new(),
|
state: Vec::new(),
|
||||||
}
|
}
|
||||||
|
|
|
@ -596,14 +596,10 @@ impl Rooms {
|
||||||
EventType::RoomMember => {
|
EventType::RoomMember => {
|
||||||
if let Some(state_key) = state_key {
|
if let Some(state_key) = state_key {
|
||||||
// if the state_key fails
|
// if the state_key fails
|
||||||
let target_user_id = UserId::try_from(state_key).map_err(|_| {
|
let target_user_id = UserId::try_from(state_key)
|
||||||
Error::BadRequest(
|
.expect("This state_key was previously validated");
|
||||||
ErrorKind::InvalidParam,
|
|
||||||
"State key of member event does not contain user id.",
|
|
||||||
)
|
|
||||||
})?;
|
|
||||||
// Update our membership info, we do this here incase a user is invited
|
// Update our membership info, we do this here incase a user is invited
|
||||||
// and imediatly leaves we need the DB to record the invite event for auth
|
// and immediately leaves we need the DB to record the invite event for auth
|
||||||
self.update_membership(
|
self.update_membership(
|
||||||
&room_id,
|
&room_id,
|
||||||
&target_user_id,
|
&target_user_id,
|
||||||
|
|
Loading…
Reference in New Issue