event-actions: Do not get member unnecessarily

This commit is contained in:
Kévin Commaille 2023-09-15 15:06:12 +02:00
parent 5fc08ef971
commit 6ebb231995
No known key found for this signature in database
GPG key ID: 29A48C1F03620416

View file

@ -128,8 +128,7 @@ where
.user()
.map(|user| user.user_id())
.unwrap();
let own_user = event.room().members().get_or_create(own_user_id);
let is_from_own_user = event.sender() == own_user;
let is_from_own_user = event.sender_id() == own_user_id;
// Remove message
fn update_remove_action(