mirror of
https://github.com/chatmail/core.git
synced 2026-04-18 22:16:30 +03:00
feat: When reactions are seen, remove notification from second device (#6480)
Instead of being trashed, the message containing a reaction remains in the chat, hidden and InFresh. When the chat is opened, it will be marked as Seen on the server, so that a second device removes the notifications for the reaction. Close https://github.com/deltachat/deltachat-core-rust/issues/6210. Also, this adds a benchmark.
This commit is contained in:
@@ -607,6 +607,19 @@ impl TestContext {
|
||||
msg
|
||||
}
|
||||
|
||||
/// Receive a message using the `receive_imf()` pipeline. Panics if it's not hidden.
|
||||
pub async fn recv_msg_hidden(&self, msg: &SentMessage<'_>) -> Message {
|
||||
let received = self
|
||||
.recv_msg_opt(msg)
|
||||
.await
|
||||
.expect("receive_imf() seems not to have added a new message to the db");
|
||||
let msg = Message::load_from_db(self, *received.msg_ids.last().unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
assert!(msg.hidden);
|
||||
msg
|
||||
}
|
||||
|
||||
/// Receive a message using the `receive_imf()` pipeline. This is similar
|
||||
/// to `recv_msg()`, but doesn't assume that the message is shown in the chat.
|
||||
pub async fn recv_msg_opt(
|
||||
|
||||
Reference in New Issue
Block a user