Ignore group updates from before the thread was created
This commit is contained in:
parent
2f906d8bb2
commit
284205303f
|
@ -269,6 +269,10 @@ extension MessageReceiver {
|
|||
}
|
||||
let group = thread.groupModel
|
||||
let oldMembers = group.groupMemberIds
|
||||
// Check that the message isn't from before the group was created
|
||||
guard Double(message.sentTimestamp!) > thread.creationDate.timeIntervalSince1970 else {
|
||||
return SNLog("Ignoring closed group update from before thread was created.")
|
||||
}
|
||||
// Check that the sender is a member of the group (before the update)
|
||||
guard Set(group.groupMemberIds).contains(message.sender!) else {
|
||||
return SNLog("Ignoring closed group update message from non-member.")
|
||||
|
|
Loading…
Reference in New Issue