pushbits/dispatcher/notification.go
eikendev 8af456df35
Revert "Use bold font for titles of notifications"
This reverts commit 1ef7440336.

Markdown syntax seems to be Riot-specific.
2020-08-07 22:06:13 +02:00

19 lines
419 B
Go

package dispatcher
import (
"fmt"
"log"
"github.com/eikendev/pushbits/model"
)
// SendNotification sends a notification to the specified user.
func (d *Dispatcher) SendNotification(a *model.Application, n *model.Notification) error {
log.Printf("Sending notification to room %s.\n", a.MatrixID)
text := fmt.Sprintf("%s\n\n%s", n.Title, n.Message)
_, err := d.client.SendText(a.MatrixID, text)
return err
}