Skip to content

Commit

Permalink
bugfix:replay miss
Browse files Browse the repository at this point in the history
  • Loading branch information
bighu630 committed Dec 9, 2024
1 parent 31044f8 commit c5b9e59
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions handler/quotation_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,12 @@ func (y *quotationsHandler) CheckUpdate(b *gotgbot.Bot, ctx *ext.Context) bool {
return getRandomProbability(0.5)
}
}
if ctx.Message.ReplyToMessage == nil {
ctx.EffectiveMessage.ReplyToMessage = new(gotgbot.Message)
if ctx.Message.Sticker != nil {
return getRandomProbability(0.05)
} else {
return getRandomProbability(0.01)
}

if ctx.Message.Sticker != nil {
return getRandomProbability(0.01)
} else {
return getRandomProbability(0.005)
}
return false
}

func (y *quotationsHandler) HandleUpdate(b *gotgbot.Bot, ctx *ext.Context) error {
Expand Down

0 comments on commit c5b9e59

Please sign in to comment.