Skip to content

Commit

Permalink
fix: do not reference info messages
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
link2xt committed Oct 3, 2024
1 parent f44b09f commit bd90101
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1234,6 +1234,7 @@ impl ChatId {
AND ((state BETWEEN {} AND {}) OR (state >= {})) \
AND NOT hidden \
AND download_state={} \
AND from_id != {} \
ORDER BY timestamp DESC, id DESC \
LIMIT 1;",
MessageState::InFresh as u32,
Expand All @@ -1242,6 +1243,10 @@ impl ChatId {
// Do not reply to not fully downloaded messages. Such a message could be a group chat
// message that we assigned to 1:1 chat.
DownloadState::Done as u32,

// Do not reference info messages, they are not actually sent outside
// and have Message-IDs unknown to other chat members.
ContactId::INFO.to_u32(),
);
sql.query_row_optional(&query, (self,), f).await
}
Expand Down

0 comments on commit bd90101

Please sign in to comment.