diff options
Diffstat (limited to 'telegram/utils.go')
-rw-r--r-- | telegram/utils.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/telegram/utils.go b/telegram/utils.go index 99492e1..905a97b 100644 --- a/telegram/utils.go +++ b/telegram/utils.go @@ -320,7 +320,7 @@ func (c *Client) getMessageReply(message *client.Message) (reply *gateway.Reply, return } - reply = &gateway.Reply { + reply = &gateway.Reply{ Author: fmt.Sprintf("%v@%s", c.getSenderId(replyMsg), gateway.Jid.Full()), Id: strconv.FormatInt(message.ReplyToMessageId, 10), } @@ -770,8 +770,8 @@ func (c *Client) messageToPrefix(message *client.Message, previewString string, } // reply to if message.ReplyToMessageId != 0 { - replyStart = c.countCharsInLines(&prefix) + (len(prefix) - 1) * len(messageHeaderSeparator) - replyLine := "reply: "+c.formatMessage(message.ChatId, message.ReplyToMessageId, true, replyMsg) + replyStart = c.countCharsInLines(&prefix) + (len(prefix)-1)*len(messageHeaderSeparator) + replyLine := "reply: " + c.formatMessage(message.ChatId, message.ReplyToMessageId, true, replyMsg) prefix = append(prefix, replyLine) replyEnd = replyStart + len(replyLine) + len(messageHeaderSeparator) } @@ -891,7 +891,7 @@ func (c *Client) ProcessIncomingMessage(chatId int64, message *client.Message) { isOutgoing := isPM && message.IsOutgoing if isOutgoing { for resource := range c.resourcesRange() { - jids = append(jids, c.jid + "/" + resource) + jids = append(jids, c.jid+"/"+resource) } } else { jids = []string{c.jid} |