This commit is contained in:
Hamcha 2016-06-21 21:26:13 +02:00
parent 20281a6113
commit acff5384b5

View file

@ -52,7 +52,7 @@ func unsplash(broker *tg.Broker, update tg.APIMessage) {
text = *(update.ReplyTo.Text) text = *(update.ReplyTo.Text)
user = update.ReplyTo.User user = update.ReplyTo.User
} else { } else {
if strings.Index(text, " ") > 0 { if strings.Index(*(update.Text), " ") > 0 {
text = strings.TrimSpace(strings.SplitN(*(update.Text), " ", 2)[1]) text = strings.TrimSpace(strings.SplitN(*(update.Text), " ", 2)[1])
} }
} }