mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-27 04:04:43 +01:00
Add GV2 accept by PNI invite.
This commit is contained in:
@@ -41,6 +41,7 @@ import org.whispersystems.signalservice.api.groupsv2.GroupsV2Operations
|
||||
import org.whispersystems.signalservice.api.push.ACI
|
||||
import org.whispersystems.signalservice.api.push.PNI
|
||||
import org.whispersystems.signalservice.api.push.ServiceId
|
||||
import org.whispersystems.signalservice.api.push.ServiceIds
|
||||
import java.util.UUID
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@@ -55,6 +56,7 @@ class GroupManagerV2Test_edit {
|
||||
|
||||
val selfAci: ACI = ACI.from(UUID.randomUUID())
|
||||
val selfPni: PNI = PNI.from(UUID.randomUUID())
|
||||
val serviceIds: ServiceIds = ServiceIds(selfAci, selfPni)
|
||||
val otherSid: ServiceId = ServiceId.from(UUID.randomUUID())
|
||||
val selfAndOthers: List<DecryptedMember> = listOf(member(selfAci), member(otherSid))
|
||||
val others: List<DecryptedMember> = listOf(member(otherSid))
|
||||
@@ -103,8 +105,7 @@ class GroupManagerV2Test_edit {
|
||||
groupsV2Operations,
|
||||
groupsV2Authorization,
|
||||
groupsV2StateProcessor,
|
||||
selfAci,
|
||||
selfPni,
|
||||
serviceIds,
|
||||
groupCandidateHelper,
|
||||
sendGroupUpdateHelper
|
||||
)
|
||||
@@ -139,8 +140,7 @@ class GroupManagerV2Test_edit {
|
||||
members = listOf(
|
||||
member(selfAci, role = Member.Role.ADMINISTRATOR),
|
||||
member(otherSid)
|
||||
),
|
||||
serviceId = selfAci.toString()
|
||||
)
|
||||
)
|
||||
groupChange(6) {
|
||||
source(selfAci)
|
||||
|
||||
@@ -43,7 +43,9 @@ import org.thoughtcrime.securesms.testutil.SystemOutLogger
|
||||
import org.whispersystems.signalservice.api.groupsv2.GroupsV2Api
|
||||
import org.whispersystems.signalservice.api.groupsv2.PartialDecryptedGroup
|
||||
import org.whispersystems.signalservice.api.push.ACI
|
||||
import org.whispersystems.signalservice.api.push.PNI
|
||||
import org.whispersystems.signalservice.api.push.ServiceId
|
||||
import org.whispersystems.signalservice.api.push.ServiceIds
|
||||
import java.util.UUID
|
||||
|
||||
@RunWith(RobolectricTestRunner::class)
|
||||
@@ -53,6 +55,7 @@ class GroupsV2StateProcessorTest {
|
||||
companion object {
|
||||
private val masterKey = GroupMasterKey(fromStringCondensed("0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"))
|
||||
private val selfAci: ACI = ACI.from(UUID.randomUUID())
|
||||
private val serviceIds: ServiceIds = ServiceIds(selfAci, PNI.from(UUID.randomUUID()))
|
||||
private val otherSid: ServiceId = ServiceId.from(UUID.randomUUID())
|
||||
private val selfAndOthers: List<DecryptedMember> = listOf(member(selfAci), member(otherSid))
|
||||
private val others: List<DecryptedMember> = listOf(member(otherSid))
|
||||
@@ -80,7 +83,7 @@ class GroupsV2StateProcessorTest {
|
||||
groupsV2Authorization = mock(GroupsV2Authorization::class.java)
|
||||
profileAndMessageHelper = mock(GroupsV2StateProcessor.ProfileAndMessageHelper::class.java)
|
||||
|
||||
processor = GroupsV2StateProcessor.StateProcessorForGroup(selfAci, ApplicationProvider.getApplicationContext(), groupDatabase, groupsV2API, groupsV2Authorization, masterKey, profileAndMessageHelper)
|
||||
processor = GroupsV2StateProcessor.StateProcessorForGroup(serviceIds, ApplicationProvider.getApplicationContext(), groupDatabase, groupsV2API, groupsV2Authorization, masterKey, profileAndMessageHelper)
|
||||
}
|
||||
|
||||
@After
|
||||
|
||||
Reference in New Issue
Block a user