Skip to content

Commit

Permalink
v1/portal: log more errors for addmember (#475)
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
maltee1 authored Jun 28, 2024
1 parent 21282c3 commit 97d87b5
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -1018,12 +1018,15 @@ func (portal *Portal) applySignalGroupChange(ctx context.Context, source *User,
}
}
} else {
puppet, _ = portal.sendMembershipForPuppetAndUser(ctx, sender, addMember.ACI, event.MembershipInvite, "added")
puppet, err = portal.sendMembershipForPuppetAndUser(ctx, sender, addMember.ACI, event.MembershipInvite, "added")
}
if puppet != nil {
puppet.IntentFor(portal).SendCustomMembershipEvent(ctx, portal.MXID, puppet.IntentFor(portal).UserID, event.MembershipJoin, "")
} else {
log.Warn().Stringer("signal_user_id", addMember.ACI).Msg("Couldn't get puppet for invite")
if err != nil {
log.Err(err).Stringer("signal_user_id", addMember.ACI).Msg("Couldn't get puppet for invite")
return
}
_, err = puppet.IntentFor(portal).SendCustomMembershipEvent(ctx, portal.MXID, puppet.IntentFor(portal).UserID, event.MembershipJoin, "")
if err != nil {
log.Err(err).Stringer("mxid", puppet.MXID).Msg("Failed to join user")
}
}
bannedMembers := make(map[uuid.UUID]bool)
Expand Down

0 comments on commit 97d87b5

Please sign in to comment.