saqura / xmppwb

XMPP Webhook Bridge [Archived]
MIT License
73 stars 8 forks source link

Avatar #10

Closed Perksls closed 8 years ago

Perksls commented 8 years ago

Hello as far as i can tell to rocket chat user's avatar is stored in https://{rocketchaturl}/avatar/{rocketchatuser}.jpg, and i think that it's possible in the incoming webook to pass the icon_url

Do you think we could pass along the {rocketchatuser} so xmpp posts would appear with the user avatar. Do you think that in the bridge.py isn't possible to just put something like 'icon_url' : "https://{rocketchaturl}/avatar/" + username.+ ".jpg" ?

saqura commented 8 years ago

This feature is now available on master (8bc11dc). I have briefly tested it and it seems to work fine. The config option avatar_url is documented in CONFIGURATION.rst. Please also understand the warning in that documentation file:

As XMPP nicknames can be freely chosen, setting this option may enable impersonating other people by having their avatar displayed. It is therefore only recommended to use this option in private setups where you trust all involved users.

If you want to test this option and provide feedback, follow the following instructions to get the latest version from git as this feature is not released to PyPi yet:

mkdir xmppwb-dev
cd xmppwb-dev
virtualenv env
source env/bin/activate
pip install --upgrade git+https://github.com/saqura/xmppwb
xmppwb -h
Perksls commented 8 years ago

Thank you!! it works great on our Rocket.Chat system . Awesome work

saqura commented 8 years ago

You are welcome, I'm glad that it works fine.