Skip to content

Commit

Permalink
check whether device == nil
Browse files Browse the repository at this point in the history
  • Loading branch information
maltee1 committed Aug 9, 2024
1 parent 5ff230d commit 3dca57a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/connector/groupinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (s *SignalClient) getGroupInfo(ctx context.Context, groupID types.GroupIden
var aci uuid.UUID
if member.ServiceID.Type == libsignalgo.ServiceIDTypePNI {
device, err := s.Client.Store.DeviceStore.DeviceByPNI(ctx, member.ServiceID.UUID)
if err != nil {
if err != nil || device == nil {
continue
}
aci = device.ACI
Expand All @@ -147,7 +147,7 @@ func (s *SignalClient) getGroupInfo(ctx context.Context, groupID types.GroupIden
var aci uuid.UUID
if member.ServiceID.Type == libsignalgo.ServiceIDTypePNI {
device, err := s.Client.Store.DeviceStore.DeviceByPNI(ctx, member.ServiceID.UUID)
if err != nil {
if err != nil || device == nil {
continue
}
aci = device.ACI
Expand Down Expand Up @@ -264,7 +264,7 @@ func (s *SignalClient) groupChangeToChatInfoChange(ctx context.Context, rev uint
var aci uuid.UUID
if member.ServiceID.Type == libsignalgo.ServiceIDTypePNI {
device, err := s.Client.Store.DeviceStore.DeviceByPNI(ctx, member.ServiceID.UUID)
if err != nil {
if err != nil || device == nil {
continue
}
aci = device.ACI
Expand All @@ -282,7 +282,7 @@ func (s *SignalClient) groupChangeToChatInfoChange(ctx context.Context, rev uint
var aci uuid.UUID
if memberServiceID.Type == libsignalgo.ServiceIDTypePNI {
device, err := s.Client.Store.DeviceStore.DeviceByPNI(ctx, memberServiceID.UUID)
if err != nil {
if err != nil || device == nil {
continue
}
aci = device.ACI
Expand Down Expand Up @@ -312,7 +312,7 @@ func (s *SignalClient) groupChangeToChatInfoChange(ctx context.Context, rev uint
var aci uuid.UUID
if member.ServiceID.Type == libsignalgo.ServiceIDTypePNI {
device, err := s.Client.Store.DeviceStore.DeviceByPNI(ctx, member.ServiceID.UUID)
if err != nil {
if err != nil || device == nil {
continue
}
aci = device.ACI
Expand Down

0 comments on commit 3dca57a

Please sign in to comment.