Don't set blank gmsg-contact URI in ghost identifiers
This commit is contained in:
parent
4998d4a34b
commit
c409f75797
1 changed files with 11 additions and 7 deletions
18
puppet.go
18
puppet.go
|
@ -289,14 +289,18 @@ func (puppet *Puppet) UpdateContactInfo(ctx context.Context) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
idents := []string{
|
||||||
|
fmt.Sprintf("tel:%s", puppet.Phone),
|
||||||
|
}
|
||||||
|
if puppet.ContactID != "" {
|
||||||
|
idents = append(idents, fmt.Sprintf("gmsg-contact:%s", puppet.ContactID))
|
||||||
|
}
|
||||||
|
|
||||||
contactInfo := map[string]any{
|
contactInfo := map[string]any{
|
||||||
"com.beeper.bridge.identifiers": []string{
|
"com.beeper.bridge.identifiers": idents,
|
||||||
fmt.Sprintf("tel:%s", puppet.Phone),
|
"com.beeper.bridge.remote_id": puppet.Key.String(),
|
||||||
fmt.Sprintf("gmsg-contact:%s", puppet.ContactID),
|
"com.beeper.bridge.service": "gmessages",
|
||||||
},
|
"com.beeper.bridge.network": "gmessages",
|
||||||
"com.beeper.bridge.remote_id": puppet.Key.String(),
|
|
||||||
"com.beeper.bridge.service": "gmessages",
|
|
||||||
"com.beeper.bridge.network": "gmessages",
|
|
||||||
}
|
}
|
||||||
err := puppet.DefaultIntent().BeeperUpdateProfile(ctx, contactInfo)
|
err := puppet.DefaultIntent().BeeperUpdateProfile(ctx, contactInfo)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue