mirror of
https://github.com/chatmail/core.git
synced 2026-04-24 17:06:28 +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:
@@ -835,8 +835,8 @@ mod tests {
|
||||
assert_eq!("@d.tt".parse::<EmailAddress>().is_ok(), false);
|
||||
}
|
||||
|
||||
use crate::chat;
|
||||
use crate::chatlist::Chatlist;
|
||||
use crate::{chat, test_utils};
|
||||
use chrono::{NaiveDate, NaiveDateTime, NaiveTime};
|
||||
use proptest::prelude::*;
|
||||
|
||||
@@ -986,8 +986,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_get_filemeta() {
|
||||
let data = include_bytes!("../test-data/image/avatar900x900.png");
|
||||
let (w, h) = dc_get_filemeta(data).unwrap();
|
||||
let (w, h) = dc_get_filemeta(test_utils::AVATAR_900x900_BYTES).unwrap();
|
||||
assert_eq!(w, 900);
|
||||
assert_eq!(h, 900);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user