mirror of
https://dev.narayana.im/narayana/telegabber.git
synced 2026-08-05 04:07:07 +00:00
Handle x-roomuser-item queries
This commit is contained in:
parent
f1b5774490
commit
4d85e36bbf
1 changed files with 14 additions and 0 deletions
|
|
@ -908,6 +908,20 @@ func handleGetDiscoInfo(s xmpp.Sender, iq *stanza.IQ, di *stanza.DiscoInfo) {
|
|||
disco.AddFeatures("jabber:iq:register")
|
||||
}
|
||||
disco.AddFeatures(gateway.NSCommand)
|
||||
} else if di.Node == "x-roomuser-item" {
|
||||
bare, _, fromOk := gateway.SplitJID(iq.From)
|
||||
if fromOk {
|
||||
session, sessionOk := sessions[bare]
|
||||
if sessionOk && session.Session.MUC {
|
||||
if toOk && toIsGroup {
|
||||
chat, _, err := session.GetContactByID(toID, nil)
|
||||
if err == nil && session.IsGroup(chat) {
|
||||
disco.SetNode(di.Node)
|
||||
disco.AddIdentity(session.GetMUCNickname(0), "conference", "text")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
chatType, chatTypeErr := getTelegramChatType(iq.From, iq.To)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue