Skip to content

Commit

Permalink
Forgot reply in some plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
Brawl345 committed Jan 24, 2024
1 parent 238ab91 commit 3157188
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions plugin/gps/gps.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func (p *Plugin) onGPS(b *gotgbot.Bot, c plugin.GobotContext) error {
_, err = b.SendVenue(c.EffectiveChat.Id, venue.Location.Latitude, venue.Location.Longitude, venue.Title, venue.Address, &gotgbot.SendVenueOpts{
ReplyParameters: &gotgbot.ReplyParameters{
AllowSendingWithoutReply: true,
MessageId: c.EffectiveMessage.MessageId,
},
DisableNotification: true,
})
Expand Down
2 changes: 2 additions & 0 deletions plugin/home/home.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ func (p *Plugin) onGetHome(b *gotgbot.Bot, c plugin.GobotContext) error {
_, err = b.SendVenue(c.EffectiveChat.Id, venue.Location.Latitude, venue.Location.Longitude, venue.Title, venue.Address, &gotgbot.SendVenueOpts{
ReplyParameters: &gotgbot.ReplyParameters{
AllowSendingWithoutReply: true,
MessageId: c.EffectiveMessage.MessageId,
},
DisableNotification: true,
})
Expand Down Expand Up @@ -130,6 +131,7 @@ func (p *Plugin) onHomeSet(b *gotgbot.Bot, c plugin.GobotContext) error {
_, err = b.SendVenue(c.EffectiveChat.Id, venue.Location.Latitude, venue.Location.Longitude, venue.Title, venue.Address, &gotgbot.SendVenueOpts{
ReplyParameters: &gotgbot.ReplyParameters{
AllowSendingWithoutReply: true,
MessageId: c.EffectiveMessage.MessageId,
},
DisableNotification: true,
})
Expand Down
12 changes: 10 additions & 2 deletions plugin/twitter/twitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,16 @@ func (p *Plugin) OnStatus(b *gotgbot.Bot, c plugin.GobotContext) error {
}
}

_, err := b.SendMediaGroup(c.EffectiveChat.Id, album, &gotgbot.SendMediaGroupOpts{DisableNotification: true,
RequestOpts: &gotgbot.RequestOpts{Timeout: 30 * time.Second}})
_, err := b.SendMediaGroup(
c.EffectiveChat.Id,
album,
&gotgbot.SendMediaGroupOpts{DisableNotification: true,
ReplyParameters: &gotgbot.ReplyParameters{
MessageId: c.EffectiveMessage.MessageId,
},
RequestOpts: &gotgbot.RequestOpts{Timeout: 30 * time.Second},
},
)
if err != nil {
// Group send failed - sending media manually as seperate messages
log.Err(err).Msg("Error while sending album")
Expand Down

0 comments on commit 3157188

Please sign in to comment.