mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 02:46:29 +03:00
Add DC_EVENT_SELFAVATAR_CHANGED (#2742)
* Add DC_EVENT_SELFAVATAR_CHANGED * Add test. Unfortunately I can't easily also test that the avatar is not copied from unencrypted messages: In the second encrypted message, the avatar would not be sent again then, because we only send avatars once a day or so. * Unfortunately I can't easily also test that the avatar is not copied from unencrypted messages: In the second encrypted message, the avatar would not be sent again then, because we only send avatars once a day or so.
This commit is contained in:
@@ -279,13 +279,13 @@ impl Context {
|
||||
let mut blob = BlobObject::new_from_path(self, value.as_ref()).await?;
|
||||
blob.recode_to_avatar_size(self).await?;
|
||||
self.sql.set_raw_config(key, Some(blob.as_name())).await?;
|
||||
Ok(())
|
||||
}
|
||||
None => {
|
||||
self.sql.set_raw_config(key, None).await?;
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
self.emit_event(EventType::SelfavatarChanged);
|
||||
Ok(())
|
||||
}
|
||||
Config::Selfstatus => {
|
||||
let def = stock_str::status_line(self).await;
|
||||
|
||||
Reference in New Issue
Block a user