Oh forgot this thing

This commit is contained in:
Hamcha 2018-11-02 15:20:10 +01:00
parent a565a604e8
commit a4b11d0b75
Signed by: hamcha
GPG key ID: A40413D21021EAEE

View file

@ -99,12 +99,18 @@ func initmods() {
} }
func dispatch(broker *tg.Broker, update tg.APIUpdate) { func dispatch(broker *tg.Broker, update tg.APIUpdate) {
for _, mod := range mods { if update.Inline != nil {
if mod.OnInline != nil { for _, mod := range mods {
go mod.OnInline(broker, *update.Inline) if mod.OnInline != nil {
go mod.OnInline(broker, *update.Inline)
}
} }
if mod.OnMessage != nil { }
go mod.OnMessage(broker, *update.Message) if update.Message != nil {
for _, mod := range mods {
if mod.OnMessage != nil {
go mod.OnMessage(broker, *update.Message)
}
} }
} }
} }