From 0053e143e77a45eeffb5c260051d349712ab158c Mon Sep 17 00:00:00 2001 From: link2xt Date: Thu, 12 Jan 2023 20:51:07 +0000 Subject: [PATCH] Do not emit ChatModified event when user avatar is updated --- src/receive_imf.rs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/receive_imf.rs b/src/receive_imf.rs index 990eebcef..a28601cd4 100644 --- a/src/receive_imf.rs +++ b/src/receive_imf.rs @@ -290,7 +290,7 @@ pub(crate) async fn receive_imf_inner( .update_contacts_timestamp(from_id, Param::AvatarTimestamp, sent_timestamp) .await? { - match contact::set_profile_image( + if let Err(err) = contact::set_profile_image( context, from_id, avatar_action, @@ -298,15 +298,10 @@ pub(crate) async fn receive_imf_inner( ) .await { - Ok(()) => { - context.emit_event(EventType::ChatModified(chat_id)); - } - Err(err) => { - warn!( - context, - "receive_imf cannot update profile image: {:#}", err - ); - } + warn!( + context, + "receive_imf cannot update profile image: {:#}", err + ); }; } }