mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
handleOpenGroupInvitation skeleton added + region added
This commit is contained in:
parent
99a62d9e99
commit
9ee167c173
@ -48,10 +48,13 @@ fun MessageReceiver.handle(message: Message, proto: SignalServiceProtos.Content,
|
||||
is ExpirationTimerUpdate -> handleExpirationTimerUpdate(message)
|
||||
is DataExtractionNotification -> handleDataExtractionNotification(message)
|
||||
is ConfigurationMessage -> handleConfigurationMessage(message)
|
||||
is OpenGroupInvitation -> handleOpenGroupInvitation(message)
|
||||
is VisibleMessage -> handleVisibleMessage(message, proto, openGroupID)
|
||||
}
|
||||
}
|
||||
|
||||
//region ControlMessage
|
||||
|
||||
private fun MessageReceiver.handleReadReceipt(message: ReadReceipt) {
|
||||
val context = MessagingModuleConfiguration.shared.context
|
||||
SSKEnvironment.shared.readReceiptManager.processReadReceipts(context, message.sender!!, message.timestamps!!, message.receivedTimestamp!!)
|
||||
@ -145,6 +148,18 @@ private fun handleConfigurationMessage(message: ConfigurationMessage) {
|
||||
storage.addContacts(message.contacts)
|
||||
}
|
||||
|
||||
// Open group invitation handling
|
||||
|
||||
fun handleOpenGroupInvitation(message: OpenGroupInvitation) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region VisibleMessage
|
||||
|
||||
// Visible message handling
|
||||
|
||||
fun MessageReceiver.handleVisibleMessage(message: VisibleMessage, proto: SignalServiceProtos.Content, openGroupID: String?) {
|
||||
val storage = MessagingModuleConfiguration.shared.storage
|
||||
val context = MessagingModuleConfiguration.shared.context
|
||||
@ -228,6 +243,10 @@ fun MessageReceiver.handleVisibleMessage(message: VisibleMessage, proto: SignalS
|
||||
SSKEnvironment.shared.notificationManager.updateNotification(context, threadID)
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
||||
//region ClosedGroupControlMessage
|
||||
|
||||
private fun MessageReceiver.handleClosedGroupControlMessage(message: ClosedGroupControlMessage) {
|
||||
when (message.kind!!) {
|
||||
is ClosedGroupControlMessage.Kind.New -> handleNewClosedGroup(message)
|
||||
@ -562,4 +581,6 @@ fun MessageReceiver.disableLocalGroupAndUnsubscribe(groupPublicKey: String, grou
|
||||
storage.removeMember(groupID, Address.fromSerialized(userPublicKey))
|
||||
// Notify the PN server
|
||||
PushNotificationAPI.performOperation(PushNotificationAPI.ClosedGroupOperation.Unsubscribe, groupPublicKey, userPublicKey)
|
||||
}
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
Loading…
Reference in New Issue
Block a user