mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
fix telegram arguments index update
This commit is contained in:
parent
abd6f4c7ef
commit
e3cb2ad86c
|
@ -12,7 +12,6 @@ type Notifier struct {
|
||||||
|
|
||||||
type NotifyOption func(notifier *Notifier)
|
type NotifyOption func(notifier *Notifier)
|
||||||
|
|
||||||
|
|
||||||
// New
|
// New
|
||||||
// TODO: register interaction with channel, so that we can route message to the specific telegram bot
|
// TODO: register interaction with channel, so that we can route message to the specific telegram bot
|
||||||
func New(interaction *Interaction, options ...NotifyOption) *Notifier {
|
func New(interaction *Interaction, options ...NotifyOption) *Notifier {
|
||||||
|
@ -38,12 +37,15 @@ func filterPlaintextMessages(args []interface{}) (texts []string, pureArgs []int
|
||||||
|
|
||||||
case types.PlainText:
|
case types.PlainText:
|
||||||
texts = append(texts, a.PlainText())
|
texts = append(texts, a.PlainText())
|
||||||
|
if textArgsOffset == -1 {
|
||||||
textArgsOffset = idx
|
textArgsOffset = idx
|
||||||
|
}
|
||||||
|
|
||||||
case types.Stringer:
|
case types.Stringer:
|
||||||
texts = append(texts, a.String())
|
texts = append(texts, a.String())
|
||||||
|
if textArgsOffset == -1 {
|
||||||
textArgsOffset = idx
|
textArgsOffset = idx
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user