Pinner fix for /pin spaces
This commit is contained in:
parent
6987041d77
commit
4f4ff8ae7b
@ -80,8 +80,16 @@ func (p *Pinner) PinMessageToSomeChats(update *tgbotapi.Update) string {
|
|||||||
return "fail"
|
return "fail"
|
||||||
}
|
}
|
||||||
|
|
||||||
chatsToPin := commandArgsList[0]
|
chatsToPin := ""
|
||||||
messageToPin := commandArgsList[1]
|
messageToPin := ""
|
||||||
|
|
||||||
|
for i := range commandArgsList {
|
||||||
|
if i == 0 {
|
||||||
|
chatsToPin = commandArgsList[i]
|
||||||
|
} else {
|
||||||
|
messageToPin += commandArgsList[i]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if messageToPin == "" {
|
if messageToPin == "" {
|
||||||
return "fail"
|
return "fail"
|
||||||
|
Reference in New Issue
Block a user