Skip to content
Snippets Groups Projects
Commit fbe4d604 authored by Jonah Husson's avatar Jonah Husson
Browse files

remove auth from nb host

parent a5ac96b1
Branches
Tags
Loading
......@@ -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)
}
......
......@@ -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()
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment