mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-22 01:40:07 +01:00
Fix blocking bugs for internal link and sync testing.
This commit is contained in:
@@ -1272,7 +1272,7 @@ final class GroupManagerV2 {
|
||||
GroupId.V2 groupId = GroupId.v2(masterKey);
|
||||
Recipient groupRecipient = Recipient.externalGroupExact(groupId);
|
||||
GV2UpdateDescription updateDescription = GroupProtoUtil.createOutgoingGroupV2UpdateDescription(masterKey, groupMutation, signedGroupChange);
|
||||
OutgoingMessage outgoingMessage = OutgoingMessage.groupUpdateMessage(groupRecipient, updateDescription, System.currentTimeMillis());
|
||||
OutgoingMessage outgoingMessage = OutgoingMessage.groupUpdateMessage(groupRecipient, updateDescription, System.currentTimeMillis(), false);
|
||||
|
||||
|
||||
DecryptedGroupChange plainGroupChange = groupMutation.getGroupChange();
|
||||
|
||||
@@ -672,7 +672,7 @@ class GroupsV2StateProcessor private constructor(
|
||||
)
|
||||
|
||||
val updateDescription = GroupProtoUtil.createOutgoingGroupV2UpdateDescription(masterKey, GroupMutation(decryptedGroup, simulatedGroupChange, simulatedGroupState), null)
|
||||
val leaveMessage = OutgoingMessage.groupUpdateMessage(groupRecipient, updateDescription, System.currentTimeMillis())
|
||||
val leaveMessage = OutgoingMessage.groupUpdateMessage(groupRecipient, updateDescription, System.currentTimeMillis(), isSelfGroupAdd = false)
|
||||
|
||||
try {
|
||||
val threadId = SignalDatabase.threads.getOrCreateThreadIdFor(groupRecipient)
|
||||
@@ -728,10 +728,17 @@ class GroupsV2StateProcessor private constructor(
|
||||
)
|
||||
|
||||
if (outgoing) {
|
||||
val isSelfGroupAdd = updateDescription
|
||||
.groupChangeUpdate!!
|
||||
.updates
|
||||
.asSequence()
|
||||
.mapNotNull { it.groupMemberJoinedUpdate }
|
||||
.any { serviceIds.matches(it.newMemberAci) }
|
||||
|
||||
try {
|
||||
val recipientId = SignalDatabase.recipients.getOrInsertFromGroupId(groupId)
|
||||
val recipient = Recipient.resolved(recipientId)
|
||||
val outgoingMessage = OutgoingMessage.groupUpdateMessage(recipient, updateDescription, timestamp)
|
||||
val outgoingMessage = OutgoingMessage.groupUpdateMessage(recipient, updateDescription, timestamp, isSelfGroupAdd)
|
||||
val threadId = SignalDatabase.threads.getOrCreateThreadIdFor(recipient)
|
||||
val messageId = SignalDatabase.messages.insertMessageOutbox(outgoingMessage, threadId, false, null).messageId
|
||||
|
||||
|
||||
Reference in New Issue
Block a user