[ejabberd] Retrieve avatar from ejabberd

Pedro Melo melo at simplicidade.org
Wed Sep 5 20:41:12 MSD 2007


On Sep 5, 2007, at 5:36 PM, mitcheloc wrote:

> Pedro & Badlop, Thanks for the replies.
> I'd like to make this as compatible with existing clients as possible
> and requiring the client to register would be a bit much. I think the
> component approach would work better for me.
> However, I'm not very familiar with component development. How would
> the component receive the presence packet to compare the hash against?

All the libraries around that support components will give you a  
stanza already parsed. That's the easy part.

The hard part is telling ejabberd to forward you all the presences.

I'm saying that this is hard just because I personally don't know how  
to do it. It might be possible, it might not be. Other persons might  
know the answer to that part.

> Does this mean the component needs to be a friend on each user's list
> or can ejabberd somehow copy the component on these packets?

the second, if that is possible.

> I think, I saw somewhere that it's possible to hook into ejabberd's
> internal xml router. If I can hook and catch these packets and have
> them forwarded to my component then I could grab not only avatars for
> local users, but also the avatar's of the user's friends...


> Does this seem sensible?

As I said, the biggest obstacle right now is figuring out how to tell  
ejabberd to forward you all the incoming and outgoing presence.

Best regards,
Pedro Melo
Blog: http://www.simplicidade.org/notes/
XMPP ID: melo at simplicidade.org

More information about the ejabberd mailing list