Skip to content

Commit

Permalink
refactor: remove unused case for GroupSource in callbackHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
kkdai committed Oct 31, 2024
1 parent 704d992 commit 83dd618
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ func callbackHandler(w http.ResponseWriter, r *http.Request) {
case webhook.TextMessageContent:
// If it is in group message, check if mention me.
switch e.Source.(type) {
case webhook.GroupSource:
case webhook.RoomSource:
for _, mention := range message.Mention.Mentionees {
botID := ""
Expand All @@ -66,7 +65,7 @@ func callbackHandler(w http.ResponseWriter, r *http.Request) {
}
switch mention.GetType() {
case "user":
botMention := mention.(*webhook.UserMentionee)
botMention := mention.(webhook.UserMentionee)
fmt.Println("Mentioned user ID=", botMention.UserId, " isSelf=", botMention.IsSelf)

if botMention.IsSelf {
Expand Down

0 comments on commit 83dd618

Please sign in to comment.