Update chore notification messages to use markdown formatting
This commit is contained in:
parent
010db330a4
commit
2004031055
|
@ -86,7 +86,7 @@ func generateDueNotifications(chore *chModel.Chore, users []*cModel.UserCircleDe
|
||||||
TypeID: 1,
|
TypeID: 1,
|
||||||
UserID: user.ID,
|
UserID: user.ID,
|
||||||
TargetID: fmt.Sprint(user.ChatID),
|
TargetID: fmt.Sprint(user.ChatID),
|
||||||
Text: fmt.Sprintf("📅 Reminder: '%s' is due today and assigned to %s.", chore.Name, assignee.DisplayName),
|
Text: fmt.Sprintf("📅 Reminder: *%s* is due today and assigned to %s.", chore.Name, assignee.DisplayName),
|
||||||
}
|
}
|
||||||
notifications = append(notifications, notification)
|
notifications = append(notifications, notification)
|
||||||
}
|
}
|
||||||
|
@ -141,7 +141,7 @@ func generateOverdueNotifications(chore *chModel.Chore, users []*cModel.UserCirc
|
||||||
TypeID: 2,
|
TypeID: 2,
|
||||||
UserID: user.ID,
|
UserID: user.ID,
|
||||||
TargetID: fmt.Sprint(user.ChatID),
|
TargetID: fmt.Sprint(user.ChatID),
|
||||||
Text: fmt.Sprintf("🚨 '%s' is now %d hours overdue. Please complete it as soon as possible. (Assigned to %s)", chore.Name, hours, assignee.DisplayName),
|
Text: fmt.Sprintf("🚨 *%s* is now %d hours overdue. Please complete it as soon as possible. (Assigned to %s)", chore.Name, hours, assignee.DisplayName),
|
||||||
}
|
}
|
||||||
notifications = append(notifications, notification)
|
notifications = append(notifications, notification)
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ func (tn *TelegramNotifier) SendChoreCompletion(c context.Context, chore *chMode
|
||||||
if user.ChatID == 0 {
|
if user.ChatID == 0 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
text := fmt.Sprintf("🎉 '%s' is completed! is off the list, %s! 🌟 ", chore.Name, user.DisplayName)
|
text := fmt.Sprintf("🎉 *%s* is completed! is off the list, %s! 🌟 ", chore.Name, user.DisplayName)
|
||||||
msg := tgbotapi.NewMessage(user.ChatID, text)
|
msg := tgbotapi.NewMessage(user.ChatID, text)
|
||||||
msg.ParseMode = "Markdown"
|
msg.ParseMode = "Markdown"
|
||||||
_, err := tn.bot.Send(msg)
|
_, err := tn.bot.Send(msg)
|
||||||
|
|
Loading…
Reference in New Issue