Browse Source

gofmt

master
Bohdan Horbeshko 2 weeks ago
parent
commit
22b46c71ce
4 changed files with 10 additions and 10 deletions
  1. +4
    -4
      telegram/commands.go
  2. +1
    -1
      telegram/handlers.go
  3. +4
    -4
      telegram/utils.go
  4. +1
    -1
      xmpp/extensions/extensions.go

+ 4
- 4
telegram/commands.go View File

@ -52,10 +52,10 @@ var transportCommands = map[string]command{
"setpassword": command{"[old] [new]", "set or remove password"},
"config": command{"[param] [value]", "view or update configuration options"},
"report": command{"[chat] [comment]", "report a chat by id or @username"},
"add": command{"@username", "add @username to your chat list"},
"join": command{"https://t.me/invite_link", "join to chat via invite link or @publicname"},
"supergroup": command{"title description", "create new supergroup «title» with «description»"},
"channel": command{"title description", "create new channel «title» with «description»"},
"add": command{"@username", "add @username to your chat list"},
"join": command{"https://t.me/invite_link", "join to chat via invite link or @publicname"},
"supergroup": command{"title description", "create new supergroup «title» with «description»"},
"channel": command{"title description", "create new channel «title» with «description»"},
}
var chatCommands = map[string]command{


+ 1
- 1
telegram/handlers.go View File

@ -242,7 +242,7 @@ func (c *Client) updateMessageContent(update *client.UpdateMessageContent) {
textContent.Text.Entities,
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)
}
}


+ 4
- 4
telegram/utils.go View File

@ -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}


+ 1
- 1
xmpp/extensions/extensions.go View File

@ -237,7 +237,7 @@ func NewReplyFallback(start uint64, end uint64) Fallback {
Body: []FallbackBody{
FallbackBody{
Start: strconv.FormatUint(start, 10),
End: strconv.FormatUint(end, 10),
End: strconv.FormatUint(end, 10),
},
},
}


Loading…
Cancel
Save