mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Rotate profile key when learning of a block by a linked device.
This commit is contained in:
committed by
Jeffrey Starke
parent
cd26929d39
commit
9ccdbb8e40
@@ -90,6 +90,7 @@ import org.thoughtcrime.securesms.payments.MobileCoinPublicAddress
|
||||
import org.thoughtcrime.securesms.ratelimit.RateLimitUtil
|
||||
import org.thoughtcrime.securesms.recipients.Recipient
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId
|
||||
import org.thoughtcrime.securesms.recipients.RecipientUtil
|
||||
import org.thoughtcrime.securesms.service.webrtc.links.CallLinkCredentials
|
||||
import org.thoughtcrime.securesms.service.webrtc.links.CallLinkRoomId
|
||||
import org.thoughtcrime.securesms.service.webrtc.links.SignalCallLinkState
|
||||
@@ -1170,7 +1171,7 @@ object SyncMessageProcessor {
|
||||
}
|
||||
MessageRequestResponse.Type.BLOCK -> {
|
||||
SignalDatabase.recipients.setBlocked(recipient.id, true)
|
||||
SignalDatabase.recipients.setProfileSharing(recipient.id, false)
|
||||
RecipientUtil.updateProfileSharingAfterBlock(recipient, true)
|
||||
SignalDatabase.messages.insertMessageOutbox(
|
||||
message = OutgoingMessage.blockedMessage(recipient, System.currentTimeMillis(), TimeUnit.SECONDS.toMillis(recipient.expiresInSeconds.toLong())),
|
||||
threadId = threadId
|
||||
@@ -1178,7 +1179,7 @@ object SyncMessageProcessor {
|
||||
}
|
||||
MessageRequestResponse.Type.BLOCK_AND_DELETE -> {
|
||||
SignalDatabase.recipients.setBlocked(recipient.id, true)
|
||||
SignalDatabase.recipients.setProfileSharing(recipient.id, false)
|
||||
RecipientUtil.updateProfileSharingAfterBlock(recipient, true)
|
||||
if (threadId > 0) {
|
||||
SignalDatabase.threads.deleteConversation(threadId, syncThreadDelete = false)
|
||||
}
|
||||
@@ -1191,7 +1192,7 @@ object SyncMessageProcessor {
|
||||
}
|
||||
MessageRequestResponse.Type.BLOCK_AND_SPAM -> {
|
||||
SignalDatabase.recipients.setBlocked(recipient.id, true)
|
||||
SignalDatabase.recipients.setProfileSharing(recipient.id, false)
|
||||
RecipientUtil.updateProfileSharingAfterBlock(recipient, true)
|
||||
SignalDatabase.messages.insertMessageOutbox(
|
||||
message = OutgoingMessage.reportSpamMessage(recipient, System.currentTimeMillis(), TimeUnit.SECONDS.toMillis(recipient.expiresInSeconds.toLong())),
|
||||
threadId = threadId
|
||||
|
||||
Reference in New Issue
Block a user