Version 1.6.0

This commit is contained in:
Bohdan Horbeshko 2023-06-08 13:33:22 -04:00
parent 79fc0ddbe5
commit 00f1417cb2
6 changed files with 18 additions and 18 deletions

View file

@ -92,7 +92,7 @@ func toKeyPrefix(tgAccount, xmppAccount string) []byte {
} }
func toByteKey(prefix, suffix []byte, typ string) []byte { func toByteKey(prefix, suffix []byte, typ string) []byte {
key := make([]byte, 0, len(prefix) + len(suffix) + 6) key := make([]byte, 0, len(prefix)+len(suffix)+6)
key = append(key, prefix...) key = append(key, prefix...)
key = append(key, []byte(typ)...) key = append(key, []byte(typ)...)
key = append(key, []byte("/")...) key = append(key, []byte("/")...)

View file

@ -15,7 +15,7 @@ import (
goxmpp "gosrc.io/xmpp" goxmpp "gosrc.io/xmpp"
) )
var version string = "1.6.0-dev" var version string = "1.6.0"
var commit string var commit string
var sm *goxmpp.StreamManager var sm *goxmpp.StreamManager

View file

@ -652,7 +652,7 @@ func (c *Client) ProcessChatCommand(chatID int64, cmdline string) (string, bool)
keyValueString("Chat title", info.Fn), keyValueString("Chat title", info.Fn),
keyValueString("Photo", link), keyValueString("Photo", link),
keyValueString("Username", info.Nickname), keyValueString("Username", info.Nickname),
keyValueString("Full name", info.Given + " " + info.Family), keyValueString("Full name", info.Given+" "+info.Family),
keyValueString("Phone number", info.Tel), keyValueString("Phone number", info.Tel),
} }
return strings.Join(entries, "\n"), true return strings.Join(entries, "\n"), true

View file

@ -274,7 +274,7 @@ func (c *Client) updateAuthorizationState(update *client.UpdateAuthorizationStat
func (c *Client) updateMessageSendSucceeded(update *client.UpdateMessageSendSucceeded) { func (c *Client) updateMessageSendSucceeded(update *client.UpdateMessageSendSucceeded) {
log.Debugf("replace message %v with %v", update.OldMessageId, update.Message.Id) log.Debugf("replace message %v with %v", update.OldMessageId, update.Message.Id)
if err := gateway.IdsDB.ReplaceTgId(c.Session.Login, c.jid, update.Message.ChatId, update.OldMessageId, update.Message.Id); err != nil { if err := gateway.IdsDB.ReplaceTgId(c.Session.Login, c.jid, update.Message.ChatId, update.OldMessageId, update.Message.Id); err != nil {
log.Error("failed to replace %v with %v: %v", update.OldMessageId, update.Message.Id, err.Error()) log.Errorf("failed to replace %v with %v: %v", update.OldMessageId, update.Message.Id, err.Error())
} }
file, _ := c.contentToFile(update.Message.Content) file, _ := c.contentToFile(update.Message.Content)

View file

@ -225,7 +225,7 @@ func HandleMessage(s xmpp.Sender, p stanza.Packet) {
suffix := "@" + msg.From suffix := "@" + msg.From
for bare := range sessions { for bare := range sessions {
if strings.HasSuffix(bare, suffix) { if strings.HasSuffix(bare, suffix) {
gateway.SendServiceMessage(bare, "Your server \"" + msg.From + "\" does not allow to send carbons", component) gateway.SendServiceMessage(bare, "Your server \""+msg.From+"\" does not allow to send carbons", component)
} }
} }
} }