aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--telegram/handlers.go6
-rw-r--r--telegram/utils.go4
2 files changed, 9 insertions, 1 deletions
diff --git a/telegram/handlers.go b/telegram/handlers.go
index 0d1cda9..71b55bc 100644
--- a/telegram/handlers.go
+++ b/telegram/handlers.go
@@ -315,10 +315,14 @@ func (c *Client) updateMessageSendFailed(update *client.UpdateMessageSendFailed)
// chat title changed
func (c *Client) updateChatTitle(update *client.UpdateChatTitle) {
+ chat, user, _ := c.GetContactByID(update.ChatId, nil)
+ if c.Session.MUC && c.IsGroup(chat) {
+ return
+ }
+
gateway.SetNickname(c.jid, strconv.FormatInt(update.ChatId, 10), update.Title, c.xmpp)
// set also the status (for group chats only)
- chat, user, _ := c.GetContactByID(update.ChatId, nil)
if user == nil {
c.ProcessStatusUpdate(update.ChatId, update.Title, "chat", gateway.SPImmed(true))
}
diff --git a/telegram/utils.go b/telegram/utils.go
index 3ab6b88..c12321d 100644
--- a/telegram/utils.go
+++ b/telegram/utils.go
@@ -1410,6 +1410,10 @@ func (c *Client) subscribeToID(id int64, chat *client.Chat) {
chat, _, _ = c.GetContactByID(id, nil)
}
if chat != nil {
+ if c.Session.MUC && c.IsGroup(chat) {
+ return
+ }
+
args = append(args, gateway.SPNickname(chat.Title))
gateway.SetNickname(c.jid, strconv.FormatInt(id, 10), chat.Title, c.xmpp)