Skip to content

Commit

Permalink
Merge pull request #20 from OldTyT/feat/send_sub_label
Browse files Browse the repository at this point in the history
[feat] Send msg with sublabel
  • Loading branch information
OldTyT authored Nov 9, 2024
2 parents 5e1ee44 + 26d42f6 commit 5daa06c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/frigate/frigate.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ func SendMessageEvent(FrigateEvent EventStruct, bot *tgbotapi.BotAPI) {
text := "*Event*\n"
text += "┣*Camera*\n┗ #" + NormalizeTagText(FrigateEvent.Camera) + "\n"
text += "┣*Label*\n┗ #" + NormalizeTagText(FrigateEvent.Label) + "\n"
if FrigateEvent.SubLabel != nil {
text += "┣*SubLabel*\n┗ #" + NormalizeTagText(fmt.Sprintf("%v", FrigateEvent.SubLabel)) + "\n"
}
t_start := time.Unix(int64(FrigateEvent.StartTime), 0)
text += fmt.Sprintf("┣*Start time*\n┗ `%s", t_start) + "`\n"
if FrigateEvent.EndTime == 0 {
Expand Down

0 comments on commit 5daa06c

Please sign in to comment.