diff --git a/api/client.go b/api/client.go index 71207cc5202bf320afb6e9790c404714753ba30f..02b35b34a5a29a831d34b11a2490817b8cba45bf 100644 --- a/api/client.go +++ b/api/client.go @@ -228,7 +228,9 @@ func Login(storageDir string, password []byte, parameters params.Network) (*Clie } if def.Notification.Address != "" { - _, err = c.comms.AddHost(&id.NotificationBot, def.Notification.Address, []byte(def.Notification.TlsCertificate), connect.GetDefaultHostParams()) + hp := connect.GetDefaultHostParams() + hp.AuthEnabled = false + _, err = c.comms.AddHost(&id.NotificationBot, def.Notification.Address, []byte(def.Notification.TlsCertificate), hp) if err != nil { jww.WARN.Printf("Failed adding host for notifications: %+v", err) } diff --git a/bindings/notifications.go b/bindings/notifications.go index 6676c28e7f6b21df553c9a90bda1df83ab8c91f2..a38d064b6659011f7c1cbc2ef7aa50f3001b7d2c 100644 --- a/bindings/notifications.go +++ b/bindings/notifications.go @@ -14,7 +14,7 @@ import ( "gitlab.com/xx_network/primitives/id" ) -// Check if a notification received is for me +// NotificationForMe Check if a notification received is for me func NotificationForMe(messageHash, idFP string, receptionId []byte) (bool, error) { messageHashBytes, err := base64.StdEncoding.DecodeString(messageHash) if err != nil { @@ -31,12 +31,12 @@ func NotificationForMe(messageHash, idFP string, receptionId []byte) (bool, erro return fingerprint.CheckIdentityFpFromMessageHash(idFpBytes, messageHashBytes, rid), nil } -// Register for notifications, accepts firebase messaging token +// RegisterForNotifications accepts firebase messaging token func (c *Client) RegisterForNotifications(token []byte) error { return c.api.RegisterForNotifications(token) } -// Unregister for notifications +// UnregisterForNotifications unregister user for notifications func (c *Client) UnregisterForNotifications() error { return c.api.UnregisterForNotifications() }