Skip to content

Commit 6bf7760

Browse files
authored
Merge pull request #58 from aln730/master
include username and location in knockEvent messages
2 parents 32e16ea + 8131ad6 commit 6bf7760

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

site/slack.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ func (bot SlackBot) updateStatus(knockEvent KnockEvent) {
9494

9595
text := ""
9696
if knockEvent.Event == "ACKNOWLEDGE" {
97-
text = "This request was answered 🟢!"
97+
text = fmt.Sprintf("This request was answered 🟢!\nUser: %s\nLocation: %s", knockEvent.Name, knockEvent.Location)
9898
} else if knockEvent.Event == "NEVERMIND" {
99-
text = "This request was cancelled 🟡!"
99+
text = fmt.Sprintf("This request was cancelled 🟡!\nUser: %s\nLocation: %s", knockEvent.Name, knockEvent.Location)
100100
} else if knockEvent.Event == "TIMEOUT" {
101-
text = "This request timed out 🔴!"
101+
text = fmt.Sprintf("This request timed out 🔴!\nUser: %s\nLocation: %s", knockEvent.Name, knockEvent.Location)
102102
}
103103

104104
_, channelID, timestamp, err := bot.api.UpdateMessage(

0 commit comments

Comments
 (0)