Skip to content
Snippets Groups Projects
Commit c23f0148 authored by Amirhossein Naghshzan's avatar Amirhossein Naghshzan Committed by Adrien Béraud
Browse files

ConversationFacade: fix URI for conversation ban

Change-Id: I64da77b634315b1f2f90c058d7a91335a7258ed0
parent 54c19544
No related branches found
No related tags found
No related merge requests found
......@@ -267,7 +267,7 @@ class DRingService : Service() {
ACTION_TRUST_REQUEST_REFUSE -> mConversationFacade.discardRequest(path.accountId, path.conversationUri)
ACTION_TRUST_REQUEST_BLOCK -> {
mConversationFacade.discardRequest(path.accountId, path.conversationUri)
mAccountService.removeContact(path.accountId, path.conversationUri.rawRingId, true)
mConversationFacade.banConversation(path.accountId, path.conversationUri)
}
}
}
......
......@@ -103,7 +103,7 @@ class TVContactPresenter @Inject constructor(
fun blockTrustRequest() {
mConversationService.discardRequest(mAccountId!!, mUri!!)
mAccountService.removeContact(mAccountId!!, mUri!!.rawRingId, true)
mConversationService.banConversation(mAccountId!!, mUri!!)
view?.finishView()
}
}
\ No newline at end of file
......@@ -53,7 +53,7 @@ class ContactRequestsPresenter @Inject internal constructor(
fun banContact(item: Conversation) {
conversationFacade.discardRequest(item.accountId, item.uri)
accountService.removeContact(item.accountId, item.uri.host, true)
conversationFacade.banConversation(item.accountId, item.uri)
}
fun copyNumber(item: Conversation) {
......
......@@ -347,7 +347,7 @@ class ConversationPresenter @Inject constructor(
fun onBlockIncomingContactRequest() {
mConversation?.let { conversation ->
conversationFacade.discardRequest(conversation.accountId, conversation.uri)
accountService.removeContact(conversation.accountId, conversation.uri.host, true)
conversationFacade.banConversation(conversation.accountId, conversation.uri)
}
view?.goToHome()
}
......
......@@ -626,14 +626,14 @@ class ConversationFacade(
.subscribe { conversation: Conversation ->
try {
val contact = conversation.contact
mAccountService.removeContact(accountId, contact!!.uri.rawUriString, true)
mAccountService.removeContact(accountId, contact!!.uri.rawRingId, true)
} catch (e: Exception) {
mAccountService.removeConversation(accountId, conversationUri)
}
}
//return mAccountService.removeConversation(accountId, conversationUri);
} else {
mAccountService.removeContact(accountId, conversationUri.rawUriString, true)
mAccountService.removeContact(accountId, conversationUri.rawRingId, true)
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment