Open bjacquin opened 9 months ago
curl -vD - -H 'Host: xmpp.lan' http://[::1]:5280/presence/jid/user/xmpp.lan/image/avatar/
Here you are requesting image
: an image that represents the client presence status, that is, one of the pixmaps that represents if the user is online, away, offline, busy...
And the string that you added later in the URL, avatar
, is interpreted following this documentation sentence:
For output types image and avatar, you can append any string to a valid URI.
In other words, ejabberd processes your URL the same way that http://[::1]:5280/presence/jid/user/xmpp.lan/image/anyrandomtext00000.png
And of course you can simply use the URL:
http://[::1]:5280/presence/jid/user/xmpp.lan/image/
If you want to get the account avatar, you should use
http://[::1]:5280/presence/jid/user/xmpp.lan/avatar/
As you learned now, you can append any random string to that URL, and ejabberd will return the same result, for example this is completely equivalent to the previous URL:
http://[::1]:5280/presence/jid/user/xmpp.lan/avatar/somerandomtext1234596789.png
In your case, requesting the avatar
returns 404 error... It seems the avatar was not stored. Notice that this module gets the user avatar using https://xmpp.org/extensions/xep-0054.html
Hi,
mod_webpresence documentation installed on 23.10 describes
/presence/jid/<user>/<server>/avatar/
as a valid URI to access user overall status, however experimentation show that URL should be/presence/jid/<user>/<server>/image/avatar/
as otherwise 404 error are returned:However, the code path within
src/mod_webpresence.erl
looks to be correct according to documentation, but I'm not an expert enough with Erlang to properly troubleshoot the issue.Thanks, Bertrand