Skip to content

Commit

Permalink
Improve hacky deduplication algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Mar 1, 2024
1 parent c88187b commit 072c002
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@ func (portal *Portal) SyncParticipants(ctx context.Context, source *User, metada
var bestParticipant *gmproto.Participant
var foundMultiple bool
for _, participant := range filteredParticipants {
if participant.GetSomeInt() == 1 && participant.GetFullName() == metadata.GetName() {
if participant.GetSomeInt() == 1 && (participant.GetFullName() == metadata.GetName() || participant.GetFormattedNumber() == metadata.GetName()) {
if bestParticipant != nil {
foundMultiple = true
break
Expand Down

0 comments on commit 072c002

Please sign in to comment.