Improve hacky deduplication algorithm
This commit is contained in:
parent
c88187b99f
commit
072c002198
1 changed files with 1 additions and 1 deletions
|
@ -1288,7 +1288,7 @@ func (portal *Portal) SyncParticipants(ctx context.Context, source *User, metada
|
||||||
var bestParticipant *gmproto.Participant
|
var bestParticipant *gmproto.Participant
|
||||||
var foundMultiple bool
|
var foundMultiple bool
|
||||||
for _, participant := range filteredParticipants {
|
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 {
|
if bestParticipant != nil {
|
||||||
foundMultiple = true
|
foundMultiple = true
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue