Skip to content

Commit

Permalink
Update message.go (PaulSonOfLars#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
celestix authored Feb 12, 2022
1 parent 20ff91a commit beb9cb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/handlers/filters/message/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ func ChatID(id int64) filters.Message {

func ForwardFromUserID(id int64) filters.Message {
return func(m *gotgbot.Message) bool {
return m.ForwardFrom.Id == id
return m.ForwardFrom != nil && m.ForwardFrom.Id == id
}
}

func ForwardFromChatID(id int64) filters.Message {
return func(m *gotgbot.Message) bool {
return m.ForwardFromChat.Id == id
return m.ForwardFromChat != nil && m.ForwardFromChat.Id == id
}
}

Expand Down

0 comments on commit beb9cb1

Please sign in to comment.