Don't set blank gmsg-contact URI in ghost identifiers

This commit is contained in:
Tulir Asokan 2024-02-29 15:50:19 +02:00
parent 4998d4a34b
commit c409f75797

View file

@ -289,11 +289,15 @@ func (puppet *Puppet) UpdateContactInfo(ctx context.Context) bool {
return false return false
} }
contactInfo := map[string]any{ idents := []string{
"com.beeper.bridge.identifiers": []string{
fmt.Sprintf("tel:%s", puppet.Phone), fmt.Sprintf("tel:%s", puppet.Phone),
fmt.Sprintf("gmsg-contact:%s", puppet.ContactID), }
}, if puppet.ContactID != "" {
idents = append(idents, fmt.Sprintf("gmsg-contact:%s", puppet.ContactID))
}
contactInfo := map[string]any{
"com.beeper.bridge.identifiers": idents,
"com.beeper.bridge.remote_id": puppet.Key.String(), "com.beeper.bridge.remote_id": puppet.Key.String(),
"com.beeper.bridge.service": "gmessages", "com.beeper.bridge.service": "gmessages",
"com.beeper.bridge.network": "gmessages", "com.beeper.bridge.network": "gmessages",