Skip to content

Commit b7cde3c

Browse files
committed
Rename some variable
1 parent 6ceac71 commit b7cde3c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/receive_imf.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2153,7 +2153,7 @@ async fn create_group(
21532153
async fn update_chats_contacts_timestamps(
21542154
context: &Context,
21552155
chat_id: ChatId,
2156-
from_id: ContactId,
2156+
ignored_id: Option<ContactId>,
21572157
to_ids: &[ContactId],
21582158
past_ids: &[ContactId],
21592159
chat_group_member_timestamps: &[i64],
@@ -2177,18 +2177,18 @@ async fn update_chats_contacts_timestamps(
21772177
.transaction(|transaction| {
21782178
let mut add_statement = transaction.prepare(
21792179
"INSERT INTO chats_contacts (chat_id, contact_id, add_timestamp)
2180-
VALUES (?1, ?2, ?3)
2181-
ON CONFLICT (chat_id, contact_id)
2182-
DO
2183-
UPDATE SET add_timestamp=?3
2184-
WHERE ?3>add_timestamp AND ?3>=remove_timestamp",
2180+
VALUES (?1, ?2, ?3)
2181+
ON CONFLICT (chat_id, contact_id)
2182+
DO
2183+
UPDATE SET add_timestamp=?3
2184+
WHERE ?3>add_timestamp AND ?3>=remove_timestamp",
21852185
)?;
21862186

21872187
for (contact_id, ts) in iter::zip(
21882188
to_ids.iter(),
21892189
chat_group_member_timestamps.iter().take(to_ids.len()),
21902190
) {
2191-
if *contact_id != from_id {
2191+
if Some(*contact_id) != ignored_id {
21922192
// It could be that member was already added,
21932193
// but updated addition timestamp
21942194
// is also a modification worth notifying about.
@@ -2357,7 +2357,7 @@ async fn apply_group_changes(
23572357

23582358
if let Some(ref chat_group_member_timestamps) = mime_parser.chat_group_member_timestamps() {
23592359
send_event_chat_modified |=
2360-
update_chats_contacts_timestamps(context, chat_id, from_id, to_ids, past_ids, &chat_group_member_timestamps)
2360+
update_chats_contacts_timestamps(context, chat_id, Some(from_id), to_ids, past_ids, &chat_group_member_timestamps)
23612361
.await?;
23622362
let new_chat_contacts = HashSet::<ContactId>::from_iter(
23632363
chat::get_chat_contacts(context, chat_id)

0 commit comments

Comments
 (0)