Skip to content

Commit

Permalink
Don’t fetch localIdentifiers where it’s available
Browse files Browse the repository at this point in the history
  • Loading branch information
max-signal committed Jan 10, 2025
1 parent fa6b693 commit 85c265a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions SignalServiceKit/Groups/GroupManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1061,9 +1061,8 @@ public class GroupManager: NSObject {

if
DependenciesBridge.shared.tsAccountManager.registrationState(tx: transaction.asV2Read).isPrimaryDevice ?? true,
let localAci = DependenciesBridge.shared.tsAccountManager.localIdentifiers(tx: transaction.asV2Read)?.aci,
oldGroupModel.membership.hasProfileKeyInGroup(serviceId: localAci),
!newGroupModel.membership.hasProfileKeyInGroup(serviceId: localAci)
oldGroupModel.membership.hasProfileKeyInGroup(serviceId: localIdentifiers.aci),
!newGroupModel.membership.hasProfileKeyInGroup(serviceId: localIdentifiers.aci)
{
// If our profile key is no longer exposed to the group - for
// example, we've left the group - check if the group had any
Expand All @@ -1089,7 +1088,7 @@ public class GroupManager: NSObject {
// Best effort.
let mutualGroupThreads = Self.mutualGroupThreads(
with: member,
localAci: localAci,
localAci: localIdentifiers.aci,
tx: transaction
)

Expand Down

0 comments on commit 85c265a

Please sign in to comment.