Exemple #1
0
 def sendToGroup(resultNode, requestEntity):
     groupInfo = InfoGroupsResultIqProtocolEntity.fromProtocolTreeNode(
         resultNode)
     jids = list(groupInfo.getParticipants().keys()
                 )  #keys in py3 returns dict_keys
     jids.remove(ownJid)
     return self.ensureSessionsAndSendToGroup(node, jids)
Exemple #2
0
				def getResultNodes(resultNode, requestEntity):
					groupInfo = InfoGroupsResultIqProtocolEntity.fromProtocolTreeNode(resultNode)
					jids = list(groupInfo.getParticipants().keys()) #keys in py3 returns dict_keys
					jids.remove(self.getLayerInterface(YowAuthenticationProtocolLayer).getUsername(True))
					jidsNoSession = []
					for jid in jids:
						if not self.store.containsSession(jid.split('@')[0], 1):
							jidsNoSession.append(jid)
					if len(jidsNoSession):
						self.getKeysFor(jidsNoSession, lambda successJids, b: self.sendToGroupWithSessions(node, successJids))
					else:
						self.sendToGroupWithSessions(node, jids)
Exemple #3
0
 def sendToGroup(resultNode, requestEntity):
     groupInfo = InfoGroupsResultIqProtocolEntity.fromProtocolTreeNode(resultNode)
     jids = list(groupInfo.getParticipants().keys()) #keys in py3 returns dict_keys
     jids.remove(ownJid)
     return self.ensureSessionsAndSendToGroup(node, jids)