You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a follow-up to #6401. Basic algorithm for group consistency was implemented in #6404 and is merged already.
Drawback of the new algorithm is that for every member that is removed from the group, a chats_contacts row is stored indefinitely with the remove_timestamp set to the time when the member was removed. The list of such members is also sent in Chat-Group-Past-Members header which can be seen as a privacy issue.
The idea to fix this issue is to replace timestamps that are older than 60 days with a timestamp 0 and not include removed members with timestamp 0 to Chat-Group-Past-Members.
Members that have a timestamps older than 60 days can be sent with a timestamp 0. Same for past members, if their timestamp is older than 60 days, it can be treated as 0 and the member should not be included into Chat-Group-Past-Members. This preserves privacy as new members will not learn exact timestamps of member addition and will not learn about past members that were removed long ago. Practically this does not change much for consistency if old timestamps are treated as 0. Old tombstones can be removed during housekeeping. 60 days is an arbitrary threshold but it is known to WhatsApp users which removes past members from the past member list after 60 days: https://faq.whatsapp.com/7179561392143247/
There is a problem with just expiring the timestamps after 60 days #6401 (comment) that should be turned into a test.
Proposed solution is at #6401 (comment)
The idea is to re-introduce member list timestamp and update it every time a message is received that updates member list, even if as a result member list is unchanged. If member list timestamp is older than 60 days, like in the case of importing old backup or the group being inactive for a long time, the chat is considered "stale".
For stale chats Chat-Group-Member-Timestamps is not sent, so only explicit changes can be applied. If a message is received in stale chat, then the whole member list should be taken from the To field (plus the sender in the From field) as if the group is created from scratch.
Alice creates a group with Bob and Charlie.
Alice exports a backup.
Alice removes Charlie, Bob gets a message that Charlie is removed.
Wait 60 days.
Bob adds Fiona to chat. Fiona does not get any info about Charlie as a past member because 60 days have passed.
Alice imports old backup.
Bob sends a message to the chat, without a tombstone for Charlie. Alice learns about Fiona.
Alice sends a message to the chat.
Fiona receives Alice's message (problem: currently it adds Charlie for Fiona; it should not because Alice should not send Chat-Group-Member-Timestamps)
Alice and Fiona receive Bob's message (problem: currently this does not remove Charlie for Alice or Fiona)
The text was updated successfully, but these errors were encountered:
This is a follow-up to #6401. Basic algorithm for group consistency was implemented in #6404 and is merged already.
Drawback of the new algorithm is that for every member that is removed from the group, a
chats_contacts
row is stored indefinitely with theremove_timestamp
set to the time when the member was removed. The list of such members is also sent inChat-Group-Past-Members
header which can be seen as a privacy issue.The idea to fix this issue is to replace timestamps that are older than 60 days with a timestamp 0 and not include removed members with timestamp 0 to
Chat-Group-Past-Members
.Members that have a timestamps older than 60 days can be sent with a timestamp 0. Same for past members, if their timestamp is older than 60 days, it can be treated as 0 and the member should not be included into
Chat-Group-Past-Members
. This preserves privacy as new members will not learn exact timestamps of member addition and will not learn about past members that were removed long ago. Practically this does not change much for consistency if old timestamps are treated as 0. Old tombstones can be removed during housekeeping. 60 days is an arbitrary threshold but it is known to WhatsApp users which removes past members from the past member list after 60 days: https://faq.whatsapp.com/7179561392143247/There is a problem with just expiring the timestamps after 60 days #6401 (comment) that should be turned into a test.
Proposed solution is at #6401 (comment)
The idea is to re-introduce member list timestamp and update it every time a message is received that updates member list, even if as a result member list is unchanged. If member list timestamp is older than 60 days, like in the case of importing old backup or the group being inactive for a long time, the chat is considered "stale".
For stale chats
Chat-Group-Member-Timestamps
is not sent, so only explicit changes can be applied. If a message is received in stale chat, then the whole member list should be taken from theTo
field (plus the sender in theFrom
field) as if the group is created from scratch.Chat-Group-Member-Timestamps
)The text was updated successfully, but these errors were encountered: