Skip to content

Commit

Permalink
Fire OnPinned for channel post (closes #244)
Browse files Browse the repository at this point in the history
  • Loading branch information
demget committed Apr 6, 2020
1 parent 0cfb922 commit 4cab32f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bot.go
Expand Up @@ -296,6 +296,13 @@ func (b *Bot) incomingUpdate(upd *Update) {
}

if upd.ChannelPost != nil {
m := upd.ChannelPost

if m.PinnedMessage != nil {
b.handle(OnPinned, m)
return
}

b.handle(OnChannelPost, upd.ChannelPost)
return
}
Expand Down

0 comments on commit 4cab32f

Please sign in to comment.