This commit is contained in:
Bohdan Horbeshko 2023-03-18 17:47:08 -04:00
parent 281b9691af
commit 22b46c71ce
4 changed files with 10 additions and 10 deletions

View file

@ -242,7 +242,7 @@ func (c *Client) updateMessageContent(update *client.UpdateMessageContent) {
textContent.Text.Entities, textContent.Text.Entities,
markupFunction, markupFunction,
)) ))
gateway.SendMessage(c.jid, strconv.FormatInt(update.ChatId, 10), text, "e" + strconv.FormatInt(update.MessageId, 10), c.xmpp, nil, false) gateway.SendMessage(c.jid, strconv.FormatInt(update.ChatId, 10), text, "e"+strconv.FormatInt(update.MessageId, 10), c.xmpp, nil, false)
} }
} }

View file

@ -320,7 +320,7 @@ func (c *Client) getMessageReply(message *client.Message) (reply *gateway.Reply,
return return
} }
reply = &gateway.Reply { reply = &gateway.Reply{
Author: fmt.Sprintf("%v@%s", c.getSenderId(replyMsg), gateway.Jid.Full()), Author: fmt.Sprintf("%v@%s", c.getSenderId(replyMsg), gateway.Jid.Full()),
Id: strconv.FormatInt(message.ReplyToMessageId, 10), Id: strconv.FormatInt(message.ReplyToMessageId, 10),
} }
@ -770,8 +770,8 @@ func (c *Client) messageToPrefix(message *client.Message, previewString string,
} }
// reply to // reply to
if message.ReplyToMessageId != 0 { if message.ReplyToMessageId != 0 {
replyStart = c.countCharsInLines(&prefix) + (len(prefix) - 1) * len(messageHeaderSeparator) replyStart = c.countCharsInLines(&prefix) + (len(prefix)-1)*len(messageHeaderSeparator)
replyLine := "reply: "+c.formatMessage(message.ChatId, message.ReplyToMessageId, true, replyMsg) replyLine := "reply: " + c.formatMessage(message.ChatId, message.ReplyToMessageId, true, replyMsg)
prefix = append(prefix, replyLine) prefix = append(prefix, replyLine)
replyEnd = replyStart + len(replyLine) + len(messageHeaderSeparator) replyEnd = replyStart + len(replyLine) + len(messageHeaderSeparator)
} }
@ -891,7 +891,7 @@ func (c *Client) ProcessIncomingMessage(chatId int64, message *client.Message) {
isOutgoing := isPM && message.IsOutgoing isOutgoing := isPM && message.IsOutgoing
if isOutgoing { if isOutgoing {
for resource := range c.resourcesRange() { for resource := range c.resourcesRange() {
jids = append(jids, c.jid + "/" + resource) jids = append(jids, c.jid+"/"+resource)
} }
} else { } else {
jids = []string{c.jid} jids = []string{c.jid}