Closed QDNT closed 5 years ago
Did you try request_info_of_jids?
`def on_roster_received(self, response: FetchRosterResponse): global groups groups.clear() listgroups = str(response.peers) listgroups = listgroups[1: -1]
for s in listgroups.split(", members="):
if "Group(" in s:
group = str(s.split("Group(")[-1]) + ","
for j in group.split(", name="):
if "jid=" in j:
jid = str(j.split("jid=")[-1])
for c in group.split(","):
if "code=" in c:
code = str(c.split("code=")[-1])
for n in group.split(","):
if "name=" in n:
name = str(n.split("name=")[-1])
groups.append([code, jid, name])`
no i have not, been away i will look into it. This is my current code that turns all groups in my roaster into an embedded list with their code jid and name. is there a better way of doing this i feel like there is a much easier way that i am missing.
im having issues resolving the group name from a JID could someone give an example on how to do this thanks