Merge pull request #360 from RyanRory/ssk-closed-group-leaving-message

Fix Group Leaving Copy
This commit is contained in:
Niels Andriesse 2020-10-05 11:22:43 +11:00 committed by GitHub
commit 91a62a7449
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -208,8 +208,12 @@ object ClosedGroupsProtocol {
groupDB.updateMembers(groupID, members.map { Address.fromSerialized(it) })
}
// Notify the user
var infoType = GroupContext.Type.UPDATE
if (isUserLeaving) {
infoType = GroupContext.Type.QUIT
}
val threadID = DatabaseFactory.getThreadDatabase(context).getThreadIdFor(Recipient.from(context, Address.fromSerialized(groupID), false))
insertOutgoingInfoMessage(context, groupID, GroupContext.Type.UPDATE, name, members, admins, threadID)
insertOutgoingInfoMessage(context, groupID, infoType, name, members, admins, threadID)
}
@JvmStatic