close
  • Mo chevron_right

    Chat picture resolver and Telegram stickers

    Timothée Jaussoin · pubsub.movim.eu / Movim · Friday, 15 May - 07:50 edit · 3 minutes

Movim 0.18 is planned to be released soon.

In the meantime, let's have a look at one specific feature that is really useful when you integrate Movim with the Spectrum2 - Telegram bridge.

For those that are not aware, XMPP can connect to other chat networks using tools called "transport". One of the most used is called Spectrum2 and can connect to many other networks thanks to its libpurple support.

Telegram transport setup

What will we do here is:

  • Setup telegram-purple in Spectrum2 on Debian
  • Connect it to a XMPP server (here ejabberd)
  • Adapt the transport to integrate with Movim

Setup Spectrum2 and telegram-purple

Here I will not detail the basic installation, the official Spectrum2 documentation is pretty complete.

Once the repository is setup, please install the base package and the libpurple module:

apt install spectrum2 spectrum2-backend-libpurple

For telegram-purple the README is also quite complete

Create a Telegram transport

Once all the packages are setup, we will create a transport configuration file. You can reuse the spectrum.cfg.example located in the /etc/spectrum2/transports/ as a base.

# nano /etc/spectrum2/transports/spectrum_telegram.cfg

This is basically the config file that I used for my own telegram.movim.eu transport:

[service]
server_mode = 0
user=spectrum

jid = telegram.movim.eu
password = spectrumpassword
server = 127.0.0.1
port = 5347
backend_host = 127.0.0.1

users_per_backend=10

backend=/usr/bin/spectrum2_libpurple_backend
protocol=prpl-telegram

web_directory=/home/movim/upload/spectrum
web_url=https://upload.movim.eu/spectrum

[identity]
name=Telegram Transport
type=telegram

[logging]
config = /etc/spectrum2/logging.cfg
backend_config = /etc/spectrum2/backend-logging.cfg

[database]
type = sqlite3

[registration]
enable_public_registration=1

When Spectrum2 will connect to the Telegram network, the stickers will be downloaded as files on the server. By default an ugly path is simply sent to the XMPP clients. We will turn it to a proper URL and let Movim to its magic.

To do that we need to configure the Web Storage module. You can also find more documentation about it there.

web_directory=/home/movim/upload/spectrum
web_url=https://upload.movim.eu/spectrum

It's pretty self explanatory. The downloaded stickers will be put in the web_directory directory. The second parameter, web_url, is basically telling Spectrum2 how to general its URL before sending them in the messages.

Configure ejabberd

Then we need to add a new service in our ejabberd.yml configuration file.

  -
    port: 5347
    module: ejabberd_service
    access: all
    ip: "127.0.0.1"
    global_routes: false
    hosts:
      "telegram.movim.eu":
        password: "spectrumpassword"

Once everything is setup, restart Spectrum2 and ejabberd. For Spectrum2 you can do it using spectrum2_manager or a dedicated systemd configuration file.

Configure our web server

We then need to expose those files to the web. A simple nginx configuration will handle it.

server {
    server_name upload.movim.eu;

    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    …

    root /home/movim/upload;

    location /spectrum {
        alias /home/movim/movim/spectrum;
    }
}

Fix the nasty file rights with Incron

If you start to use your Telegram transport at this point you'll notice that the stickers URLs are returning a 403 Forbidden error.

Indeed, Spectrum2 is writting the files in the directory using it's own rights. And this can't be configured.

We will then use another useful tool called Incron. This tool works like CRON but instead of working on time events, it works on file events.

You can find a pretty complete documentation there.

apt install incron 
nano /etc/incron.allow # add your spectrum user there
sudo -su spectrum
incrontab -e

In the incrontab file well then change dynamicaly the rights of the files once they are wrote in the directory (check the documentation for more details).

/home/movim/upload/spectrum   IN_CLOSE_WRITE          chmod 664 $@/$#

Enjoy your nice Telegram stickers in Movim

In Movim, nothing more to do. With the version 0.18, Movim will try to resolve the incoming messages that contains a URL and see if it's a valid picture. Which is the case for Telegram stickers.

Telegram stickers displayed in the Movim chat

You can also note that it works for any other incoming picture URL, including those sent using Conversations or other XMPP clients.

That's all folks!

#telegram #xmpp #movim #transport #stickers #ejabberd #admin

  • Be chevron_right

    # XMPP helping businesses & MIX in Kaidan

    marek · pubsub.movim.eu / berlin-xmpp-meetup · Wednesday, 6 May - 15:34 edit

XMPP helping businesses

This time, we will enjoy a remote talk of Sonny who is a long-time XMPP user and developer about how the XMPP ecosystem (ejabberd, PubSub, xmpp.js, ...) is helping businesses and why as well as how to write XMPP applications with JavaScript.

MIX in Kaidan

We will also have the pleasure to see the implementation of the new MIX group-chat functionality in the cross-platform client Kaidan.

Furthermore we would like to mention, that there was a meet up in April, but we haven't been able to announce it here.

When? Wednesday, 2020-05-13 18:00 CEST (always 2ⁿᵈ Wednesday of every month)

Where? this time online at https://meet.dbjr.org/berlin-meetup

See you then!

Or join our non-physical room xmpp:berlin-meetup@conference.conversations.im?join!

#xmpp #community #freesoftware #berlin #meetup #xmppjs #xmppecosystem #MIX #Kaidan

  • favorite

    2 Like

    Timothée Jaussoin , debacle

  • Mo chevron_right

    A 3in1 surprise! Movim 0.17.1, Movim Android 0.17.0.0 and Movim Account Panel

    Timothée Jaussoin · pubsub.movim.eu / Movim · Sunday, 22 March - 15:19 edit · 2 minutes

A bit more than a month after the #Movim 0.17.1 Catalina release I'm pleased to deliver two new releases and a new tool to all the movim.eu users. Let's dive in all those new exciting features.

Movim 0.17.1

This minor #release focuses on a few things. We could call it an "integration release". In fact most of the work done were to help with the new Debian package and for the new Android app release.

Regarding the Debian package, I'd like to personally thanks Dominik George aka Natureshadow from Teckids e.V. and mirabilos for their continuous work on the dependency packaging, patches and general maintenance of the .deb. They were both added in this release on the Core Contributors page. Thanks!

Upload widget improvements

The #Upload #widget, that is used to upload files and pictures during the Posts and Messages publication has been redesigned. You can now drag and drop files from your explorer directly in the drop area. The picture visualization has also been improved and now display more information about it.

Uploaded widget screen, uploaded using the upload feature, this is so META

Integration with the new Movim Android release

The Movim #Android app has not been updated for a while. This new release improves the integration experience one step further.

In fact, the top bar is now transparent and integrates with the rest of the user interface. The pod switching button is not shown anymore during the startup process (that was slowing down the launch of the app) but directly in the navigation bar (you will need to upgrade both Movim and Movim Android to handle this feature). This allows Movim to launch in only a few seconds on a standard 4G connection.

Movim now integrates even more within the Android UI

On the Chat page, it is now possible to close the conversations using a simple drag-to-left movement. Similar to what you can find on Telegram for example.

Movim Account Panel

Last but not least, all the movim.eu #XMPP accounts have now access to a new panel. Available on api.movim.eu/accounts it allows some account wise configuration to complete some features unavailable client side.

To authenticate a "one click link" mechanism has been added. Once your identifier entered this authentication link will be send directly by chat allowing you to access your Account Panel.

Through this panel you'll be able to list all the existing files you ever uploaded using your XMPP account, in the future you'll be able to also delete them.

Uploaded browser files on the Movim Account Panel

Email to XMPP

This Panel also contains an exclusive feature, the possibility to receive #emails on your XMPP account.

This feature is only working one way, in fact it's our mascot, and now postwoman Miho that will take care of delivering the emails as chat messages directly to you. Please notice that the attachments are not forwarded and we are not applying any form of SPAM filtering on them. The emails are transferred as it in their textual version to you.

The Email to XMPP feature

That's all folks! And don't forget, to prevent the spread of the #COVID19, stays safe at home!

  • image
  • favorite

    6 Like

    meta , omniscion , racuna , newbie , preptorrent , guillaume

  • 4 Comments

  • person

    30 March mexplorer

    How about Movim and OMEMO for 1to1 Chats?

  • person

    4 April preptorrent

    I want to be able to have a collada file as my avatar so it can be 3D in WebGL html5. Then, if a browser cannot display it, the old default jpeg/gif is displayed instead. The filesize of the collada file could be small. A rotating cube could be a cool collada file to have. A QR code to one's movim blog could be one of the 6 sides.

  • person

    2 May preptorrent

    https://api.movim.eu/accounts/ It is very cool but, having completed it, I cannot find that file storage area now days later, even if I use this hyperlink in a web-browser. The cog "config" icon does not show it either. What is the correct hyperlink to see files now? Cheers. What is the file-size limit? Is it a total of 5 megabytes for all files? I also think running a full movim server on a old smartphone (such as a nexus5) via "PostmarketOS" would be very very cool indeed. If anybody wants to release an online (easy) installer to do that for "PostmarketOS", it would be awesome. https://en.wikipedia.org/wiki/PostmarketOS

  • person

    4 May guillaume

    Great to hear the good folks at Teckids e.V. continue to maintain the Debian package.
    I'm curious about the new email feature, is there some webpage or docs explaining what this does ?

A Positive Note

Dave Cridland, who works on a health system communication app based on XMPP, wrote on the XSF mailing list:

Hello!

Today is a Sunday. It's normally a quiet day in the National Health Service in the UK - only emergency cases get dealt with.

Yesterday, however, the service I help run peaked at more messages than it'd normally see on a weekday - and it'll do the same today. If the growth curve holds, this week will see more messages than the system had last year.

By messages, I mean XMPP message stanzas.

The technology we've built - and continue to build - here in the XMPP Standards Foundation is actively being used to save lives. Not a few lives, either, but hundreds, and perhaps thousands, of lives, not just in the UK but increasingly in other countries too.

People are also turning to things like Whatsapp, Zoom, Hangouts, and of course Jitsi - all of which had or still have XMPP at their core. These are helping both create the physical isolation we need, and also breach the social isolation that would otherwise result.

So if things feel a little bleak right now, and you feel a need for action, then just remember - you have already helped make this crisis hurt less than it would have done without your efforts.

Thank you,

Dave.

#xmpp #openstandards #xsf #health #coronacrisis #nhs #pando #jitsi

  • favorite

    3 Like

    Timothée Jaussoin , DebXWoody , Orbifx

  • Be chevron_right

    Berlin Online XMPP Sprint 2020

    debacle · pubsub.movim.eu / berlin-xmpp-meetup · Sunday, 22 March - 00:47 edit

Berlin Online XMPP Sprint 2020

The planned XMPP sprint in Berlin from Thursday, 2020-03-26 to Sunday, 2020-03-29, will take place despite the current crisis. But instead of an in-person meeting, it will be an online event!

We will mainly use the XMPP group chat xmpp:xmpp-sprint@chat.cluxia.eu?join for all coordination, and multiple Jitsi instances for audio/video conferencing, maybe also mumble for voice chat.

Please find all details in the wiki and consider participation! This time, there are neither travel nor hotel costs! https://wiki.xmpp.org/web/Sprints/2020_March_Berlin

See you at the Berlin Online XMPP Sprint! Berlin is whereever you are!

#xmpp #sprint #event #community #hacking #freesoftware #uwpx #beagleim #siskinim #xmppjs #omemo #kaidan #smack #dino #omemo #prosody #xmpprs #salutatoi #debian #jitsi

  • favorite

    1 Like

    DebXWoody

  • chevron_right

    Leaving Riot/Matrix urgently!

    Orbifx · Monday, 16 March - 18:15 edit

Redacting all messages from room's I created on #Matrix has taken days. #Riot is going over 20GiB after a while, so I had to borrow a computer with more RAM.

All this because there isn't simple way to purge or delete messages.

When I asked on Matrix HQ, all I got told by admins was that my question was unintelligible. It is still unknown to me how and when matrix.org purges data.

This can't be good for #privacy and data ownership, even for encrypted messages.

Long live #XMPP.

  • favorite

    2 Like

    Marzanna , unkraut

  • Be chevron_right

    Requirements Elicitation for Usable Systems

    debacle · pubsub.movim.eu / berlin-xmpp-meetup · Saturday, 7 March - 14:47

Requirements Elicitation for Usable Systems

This time, we will enjoy a remote talk about requirements engineering and usability. This talk is not only related to XMPP, but we surely will have a vibrant discussion how to apply the lesson learned in XMPP.

Furthermore we will talk about the Berlin XMPP Sprint, planned for end of March.

When? Wednesday, 2020-03-11 18:00 CET (always 2ⁿᵈ Wednesday of every month)

Where?xHain hack+makespace, Grünberger Str. 16, 10243 Berlin (as always)

See you then!

Or join our non-physical room (xmpp:berlin-meetup@conference.conversations.im?join)!

#xmpp #community #xhain #freesoftware #berlin #meetup #sprint #usability #requirementsengineering

  • chevron_right

    Security scandal around WhatsApp shows the need for decentralised messengers and digital sovereignty

    DebXWoody · Saturday, 29 February - 05:48

The recent security scandal around WhatsApp and access to the content of private groups shows that there is an urgent need for action with regard to secure communication. [...]

Quelle und Informationen: https://www.fsfe.org/news/2020/news-20200228-01.de.html

#FSFE #XMPP