Skip to content

Commit 4c8e2fd

Browse files
committed
refactor(sdk): no need to recompute push actions from /messages, since try_decrypt_event does it for us
1 parent 55342a8 commit 4c8e2fd

File tree

1 file changed

+2
-13
lines changed
  • crates/matrix-sdk/src/room

1 file changed

+2
-13
lines changed

crates/matrix-sdk/src/room/mod.rs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -361,23 +361,12 @@ impl Room {
361361
)
362362
.await;
363363

364-
let mut response = Messages {
364+
Ok(Messages {
365365
start: http_response.start,
366366
end: http_response.end,
367367
chunk,
368368
state: http_response.state,
369-
};
370-
371-
if let Some(push_context) = self.push_condition_room_ctx().await? {
372-
let push_rules = self.client().account().push_rules().await?;
373-
374-
for event in &mut response.chunk {
375-
event.push_actions =
376-
Some(push_rules.get_actions(event.raw(), &push_context).to_owned());
377-
}
378-
}
379-
380-
Ok(response)
369+
})
381370
}
382371

383372
/// Register a handler for events of a specific type, within this room.

0 commit comments

Comments
 (0)