Skip to content
Snippets Groups Projects
Commit ac9ad94c authored by Pierre Nicolas's avatar Pierre Nicolas :joy:
Browse files

conversation_details: enable unban

GitLab: #1747
Change-Id: Ide7b71afac093f3d6c04d0e41e5f0c0919ff93f8
parent 70f848aa
Branches
Tags
No related merge requests found
...@@ -1412,7 +1412,7 @@ class AccountService( ...@@ -1412,7 +1412,7 @@ class AccountService(
} }
private enum class ConversationMemberEvent { private enum class ConversationMemberEvent {
Add, Join, Remove, Ban Add, Join, Remove, Ban, Unban
} }
fun conversationMemberEvent(accountId: String, conversationId: String, peerUri: String, event: Int) { fun conversationMemberEvent(accountId: String, conversationId: String, peerUri: String, event: Int) {
...@@ -1420,7 +1420,9 @@ class AccountService( ...@@ -1420,7 +1420,9 @@ class AccountService(
getAccount(accountId)?.let { account -> account.getSwarm(conversationId)?.let { conversation -> getAccount(accountId)?.let { account -> account.getSwarm(conversationId)?.let { conversation ->
val uri = Uri.fromId(peerUri) val uri = Uri.fromId(peerUri)
when (val memberEvent = ConversationMemberEvent.entries[event]) { when (val memberEvent = ConversationMemberEvent.entries[event]) {
ConversationMemberEvent.Add, ConversationMemberEvent.Join -> { ConversationMemberEvent.Add,
ConversationMemberEvent.Join,
ConversationMemberEvent.Unban -> {
val contact = conversation.findContact(uri) val contact = conversation.findContact(uri)
if (contact == null) { if (contact == null) {
val role = if (memberEvent == ConversationMemberEvent.Add) val role = if (memberEvent == ConversationMemberEvent.Add)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment