Provide Google Talk message to all registered customers using XMPPPY
I have a small program that sends me messages using XMPPPY, however sometimes when I send a message I only get it on one of the registered clients. When submitting via gmail interface, I always get it on all registered clients.
Here is my code:
username = ''
password = ''
class Gtalk():
def send(self, recipient, message):
self.jid=xmpp.protocol.JID(username)
self.client=xmpp.Client(self.jid.getDomain())
self.connection = self.client.connect()
self.auth=self.client.auth(
self.jid.getNode(),
password,
resource=self.jid.getResource()
)
self.client.sendInitPresence(requestRoster=0)
self.client.send(xmpp.protocol.Message(
recipient, message
)
)
g = Gtalk()
g.send('', 'Hello')
Does anyone know how to send a message using XMPPPY that appears on all clients registered with Gmail?
0
source to share
1 answer
See fooobar.com/questions/223622 / ... JIDs (Jabber / XMPP IDs and hence Google Talk IDs) have several forms: First, this is a "naked JID", for example: user@example.com Second, it is "full JID", for example: user@example.com / xyz123, where xyz123 is called a resource.
You are using the full JUD, and why the message only appears on the xyz123 client.
0
source to share