Add Event Producer
Update User to carry webhook from circle if assigned Refactor notification handling and update models for webhook support
This commit is contained in:
parent
44cb5501dd
commit
04d1894aea
17 changed files with 351 additions and 101 deletions
|
@ -70,12 +70,10 @@ func (tn *TelegramNotifier) SendChoreCompletion(c context.Context, chore *chMode
|
|||
|
||||
}
|
||||
|
||||
func (tn *TelegramNotifier) SendNotification(c context.Context, notification *nModel.Notification) error {
|
||||
|
||||
func (tn *TelegramNotifier) SendNotification(c context.Context, notification *nModel.NotificationDetails) error {
|
||||
log := logging.FromContext(c)
|
||||
if notification.TargetID == "" {
|
||||
log.Error("Notification target ID is empty")
|
||||
return errors.New("Notification target ID is empty")
|
||||
return errors.New("unable to send notification, targetID is empty")
|
||||
}
|
||||
chatID, err := strconv.ParseInt(notification.TargetID, 10, 64)
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue