0
votes

I have a small program that send messages to me using XMPPPY, however, sometimes when sending a message I only receive it on one of the logged in clients. When sending through the gmail interface I always receive it on all logged in 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 anybody know how to send a message using XMPPPY that appears on all logged in gmail clients?

1

1 Answers

0
votes

See https://stackoverflow.com/a/2473747 JIDs (Jabber/XMPP IDs and therefore Google Talk IDs) have several forms: First is a "bare JID", e.g.: [email protected] Secondly is a "full JID", e.g.: [email protected]/xyz123, where xyz123 is called the resource.

You use full JUD, and that why appear your message only on xyz123 client.