Reputation: 107
I am writing a chat application on app engine using xmpp. My idea is to allow users to chat to one another. I can get messages to send to a google talk account, by taking the logged in user and removing the @gmail.com part of the address and replacing it with @appid.appspotchat.com )so for example if the logged in user is [email protected], the jid used to send from will be [email protected]). You can then send messages to an google talk account, e.g. [email protected].
My problem is in receiving the messages back again. The developer pages show how the app itself can receive messages to the [email protected] jid, but how do you get it to receive messages to the appid.appspot.com jid, and then present these messages tp the logged in user? The overall idea is when a user logs in, I will retrieve thri contact list, get the presence of their contacts (replacing gmail.com with appid.appspotchat.com) then present the available contacts to the user.
If this is not possible, is there a way to let the logged in user chat to other users in a different way? Ive briefly looked at the channel api but i don't think this is suitable?
Upvotes: 0
Views: 872
Reputation: 8471
You could use the Channel API to send a message down to a client when your server gets a message intended for that user. There's no facility to direct a XMPP message directly to a user on your own page; the XMPP API is used to send messages to users signed in to XMPP clients (such as Gmail, Pidgin, etc).
Upvotes: 2
Reputation: 80330
You can't use anything@your_app_id.appspot.com
. Instead you must use anything@your_app_id.appspotchat.com
as described in XMPP Addresses.
Upvotes: 1