Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc9a7eab

Browse files
max-signalsashaweiss-signal
authored andcommitted
Fix group invites
1 parentfc83f00 commitc9a7eab

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

‎SignalServiceKit/Groups/GroupManager.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ public class GroupManager: NSObject {
166166
tryawaitSSKEnvironment.shared.groupsV2Ref.tryToFetchProfileKeyCredentials(
167167
for: initialGroupMembership.allMembersOfAnyKind.compactMap{ $0.serviceIdas?Aci},
168168
ignoreMissingProfiles:false,
169+
ignoreMissingCredentials:true,
169170
forceRefresh:false
170171
)
171172

@@ -1405,6 +1406,7 @@ extension GroupManager {
14051406
tryawaitSSKEnvironment.shared.groupsV2Ref.tryToFetchProfileKeyCredentials(
14061407
for: serviceIds.compactMap{ $0as?Aci},
14071408
ignoreMissingProfiles:false,
1409+
ignoreMissingCredentials:true,
14081410
forceRefresh:false
14091411
)
14101412

‎SignalServiceKit/Groups/GroupsV2.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,14 @@ public protocol GroupsV2 {
9292

9393
func loadProfileKeyCredentials(
9494
for acis:[Aci],
95+
ignoreMissingCredentials:Bool,
9596
forceRefresh:Bool
9697
)asyncthrows->ProfileKeyCredentialMap
9798

9899
func tryToFetchProfileKeyCredentials(
99100
for acis:[Aci],
100101
ignoreMissingProfiles:Bool,
102+
ignoreMissingCredentials:Bool,
101103
forceRefresh:Bool
102104
)asyncthrows
103105

@@ -547,6 +549,7 @@ public class MockGroupsV2: GroupsV2 {
547549

548550
publicfunc loadProfileKeyCredentials(
549551
for acis:[Aci],
552+
ignoreMissingCredentials:Bool,
550553
forceRefresh:Bool
551554
)asyncthrows->ProfileKeyCredentialMap{
552555
owsFail("Not implemented.")
@@ -555,6 +558,7 @@ public class MockGroupsV2: GroupsV2 {
555558
publicfunc tryToFetchProfileKeyCredentials(
556559
for acis:[Aci],
557560
ignoreMissingProfiles:Bool,
561+
ignoreMissingCredentials:Bool,
558562
forceRefresh:Bool
559563
)asyncthrows{}
560564

‎SignalServiceKit/Groups/GroupsV2Impl.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ public class GroupsV2Impl: GroupsV2 {
185185

186186
letprofileKeyCredentialMap=tryawaitloadProfileKeyCredentials(
187187
for: acis,
188+
ignoreMissingCredentials:false,
188189
forceRefresh: shouldForceRefreshProfileKeyCredentials
189190
)
190191
returntryGroupsV2Protos.buildNewGroupProto(
@@ -1282,11 +1283,13 @@ public class GroupsV2Impl: GroupsV2 {
12821283
/// any are missing, returns an error.
12831284
public func loadProfileKeyCredentials(
12841285
for acis:[Aci],
1285-
forceRefresh: Bool
1286+
ignoreMissingCredentials: Bool,
1287+
forceRefresh: Bool,
12861288
)async throws-> ProfileKeyCredentialMap{
12871289
tryawaittryToFetchProfileKeyCredentials(
12881290
for: acis,
12891291
ignoreMissingProfiles:false,
1292+
ignoreMissingCredentials: ignoreMissingCredentials,
12901293
forceRefresh: forceRefresh
12911294
)
12921295

@@ -1308,6 +1311,7 @@ public class GroupsV2Impl: GroupsV2 {
13081311
publicfunc tryToFetchProfileKeyCredentials(
13091312
for acis:[Aci],
13101313
ignoreMissingProfiles: Bool,
1314+
ignoreMissingCredentials: Bool,
13111315
forceRefresh: Bool
13121316
)async throws{
13131317
letacis=Set(acis)
@@ -1330,6 +1334,8 @@ public class GroupsV2Impl: GroupsV2 {
13301334
_=tryawait profileFetcher.fetchProfile(for: aciToFetch, context: context)
13311335
}catchProfileRequestError.notFoundwhere ignoreMissingProfiles{
13321336
// this is fine
1337+
}catchProfileFetcherError.couldNotFetchCredentialwhere ignoreMissingCredentials{
1338+
// this is fine
13331339
}
13341340
}
13351341
}
@@ -1839,7 +1845,7 @@ public class GroupsV2Impl: GroupsV2 {
18391845
)async throws-> GroupsProtoGroupChangeActions{
18401846
letlocalAci= localIdentifiers.aci
18411847

1842-
letprofileKeyCredentialMap=tryawaitloadProfileKeyCredentials(for:[localAci], forceRefresh:false)
1848+
letprofileKeyCredentialMap=tryawaitloadProfileKeyCredentials(for:[localAci],ignoreMissingCredentials:false,forceRefresh:false)
18431849

18441850
guardlet localProfileKeyCredential=profileKeyCredentialMap[localAci]else{
18451851
throwOWSAssertionError("Missing localProfileKeyCredential.")

‎SignalServiceKit/Groups/GroupsV2OutgoingChangesImpl.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ public class GroupsV2OutgoingChangesImpl: GroupsV2OutgoingChanges {
260260

261261
letprofileKeyCredentialMap=tryawaitSSKEnvironment.shared.groupsV2Ref.loadProfileKeyCredentials(
262262
for:Array(newUserAcis),
263+
ignoreMissingCredentials:false,
263264
forceRefresh: forceRefreshProfileKeyCredentials
264265
)
265266

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp