Skip to content

Commit d1e59a5

Browse files
committed
fix: do not response artwork info to self inline query message
1 parent 8c5a687 commit d1e59a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

telegram/handlers/handlers.go

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ func RegisterHandlers(hg *telegohandler.HandlerGroup) {
4141
hg.HandleCallbackQueryCtx(ArtworkPreview, telegohandler.CallbackDataContains("artwork_preview"))
4242
hg.HandleInlineQueryCtx(InlineQuery)
4343
hg.HandleMessageCtx(GetArtworkInfo, func(update telego.Update) bool {
44+
if update.Message.ViaBot != nil && update.Message.ViaBot.Username == BotUsername {
45+
return false
46+
}
4447
return utils.FindSourceURLForMessage(update.Message) != ""
4548
})
4649
}

0 commit comments

Comments
 (0)