Skip to content

Commit aab29a1

Browse files
committed
fix: do not reference info messages
In particular, for newely promoted group we previously referenced info message saying "Others will only see this group after you sent a first message." and for the receiver it looked like there was some previous message that was not delivered.
1 parent 318d0b0 commit aab29a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/chat.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,7 @@ impl ChatId {
12341234
AND ((state BETWEEN {} AND {}) OR (state >= {})) \
12351235
AND NOT hidden \
12361236
AND download_state={} \
1237+
AND from_id != {} \
12371238
ORDER BY timestamp DESC, id DESC \
12381239
LIMIT 1;",
12391240
MessageState::InFresh as u32,
@@ -1242,6 +1243,9 @@ impl ChatId {
12421243
// Do not reply to not fully downloaded messages. Such a message could be a group chat
12431244
// message that we assigned to 1:1 chat.
12441245
DownloadState::Done as u32,
1246+
// Do not reference info messages, they are not actually sent outside
1247+
// and have Message-IDs unknown to other chat members.
1248+
ContactId::INFO.to_u32(),
12451249
);
12461250
sql.query_row_optional(&query, (self,), f).await
12471251
}

0 commit comments

Comments
 (0)