YunoHost-Apps / synapse_ynh

Matrix server (synapse) package for YunoHost
https://matrix.org/
GNU General Public License v3.0
79 stars 42 forks source link

Bots integrations and Bridges #170

Open Thatoo opened 4 years ago

Thatoo commented 4 years ago

Hello,

One of the great idea of Matrix is to make bridges to all different other chat apps. I had asked about the IRC bridge earlier : https://github.com/YunoHost-Apps/synapse_ynh/issues/93 It seems that other bridges are becoming mature too :

Gredin67 is working on a template package for mautrix bots in here https://github.com/Gredin67/mautrix_template_ynh . So if you feel like packaging one of these bridge from the template, it would be nice.

Would all these 4 bridges better be integrated as"plugin" to our Synapse_ynh app (if even possible, maybe with the help of config panel) or stand as Yunohost App on the side of Synapse_ynh app?

Josue-T commented 4 years ago

Hello,

Well, It would be a good idea to integrate this in the yunohost package. But actually I've too many things to do and I don't really have the time to implement this.

hieronymousch commented 4 years ago

Integration seems a stretch, especially because bridges are developed on their own. You can run the Mautrix bridges for whatsapp & telegram from console and they don't require big changes to integrate. No experience with Signal.

ghost commented 4 years ago

I tried and wasn't able to get it work. so i would love to see this integrated.

I think an update with integrated Bridges should be able to handle/ignor existing Bridges otherwise we probably get in trouble

Anyway great work everything is working out of the box.

ghost commented 4 years ago

probably this plug in system could be integrated too? (or different issue, FR?)

Gredin67 commented 4 years ago

Hi, we were discussing this here. I had the bridge working on my yunohost some month ago. I could get it running again. But I have no experience with packaging app. So I started it here but could not get farther. There has been some progress in the matrix-docker-ansible project. Does it make more sense to package this rather than the upstream package

Josue-T commented 4 years ago

Hello,

In my point of view, using docker is not the good way to package an app in yunohost. It would be really better to integrate directly the bridge in yunohost without a container like docker. Use docker in yunohost only if there are no other way to do it.

Gredin67 commented 4 years ago

And what about golang that is used for installation of the upstream app? Is it OK to keep this installation method for the yunohost appa packaging? https://github.com/tulir/mautrix-whatsapp/wiki/Bridge-setup

hieronymousch commented 4 years ago

thing is that each bridge that you need to cover most IM users (WhatsApp, Facebook and telegram) uses other programming languages, storage requirements etc. there is unfortunately no uniform way to build them. I understand that docker is not ideal but it seems to be the most practical one at this stage of the development. most of the bridges are still in alpha...

Thatoo commented 4 years ago

alpha maybe but after few month using irc bridge and telegram bridge of others (I don't have), they work well. I'll relly appreciate to have them on my own server to really self host all services. So I thank you all those working on this issue and if I can help with testing, tell me which testing bramch I should install to make test and report.

Gredin67 commented 4 years ago

if I can help with testing, tell me which testing branch I should install to make test and report.

I got mautrix-whatsapp bridge up and running again on my internet cube (ARMv7). I will try to push necessary files in the next time. As far as I understand I should just build it with go build on my cube and then push the built file in the sources of the mautrix-whatsapp_ynh app. If someone wants to run it on another architecture, then a new build should be pushed.

Josue-T commented 4 years ago

I got mautrix-whatsapp bridge up and running again on my internet cube (ARMv7). I will try to push necessary files in the next time.

Was it working. As I know the whatsapp bridge use an android VM to run whatsapp. So I was searching some solution about that but I concluded that I would be probably really complicated to run an android VM an ARMv7.

As far as I understand I should just build it with go build on my cube and then push the built file in the sources of the mautrix-whatsapp_ynh app. If someone wants to run it on another architecture, then a new build should be pushed.

Well, it's not really the good way to manage the binary as it make after the git repository really big. The other better solution is to make a specific repository for this and to push the binary in the release part as I do here: https://github.com/YunoHost-Apps/synapse_python_build/releases

Gredin67 commented 4 years ago

Thanks for these precisions. I am not dealing with the VM issue right now as I am still using whatsapp for calls on my smartphone. It would be nice to have several instances of whatsapp running on one VM though. I will try to find a solution after the packaging is done.

The bridhe developer already provides binaries as an alternative installation method: https://github.com/tulir/mautrix-whatsapp/wiki/Bridge-setup Can you explain me if/how I can use the prebuild executable available here: https://mau.dev/tulir/mautrix-whatsapp/pipelines Is it already the binary you are talking about?

Thatoo commented 4 years ago

How could I help you to make tests @Gredin67 ?

Gredin67 commented 4 years ago

@Thatoo I made a PR in which install script is working on my VM. https://github.com/YunoHost-Apps/mautrix-whatsapp_ynh/pull/3 If you could test it in a public test server and connect with a whatsapp account. My next plan is to get the remove script functional. Then I'm not experienced to get the next steps.

Thatoo commented 4 years ago

I'm trying to install it. What is the synapse instance number?

Thatoo commented 4 years ago

second question. When you ask who could use the robot, the admin only, a uesr, all matrix or a specific server (matrix.org)?

If we want to limit to a specific server, we should write the synapse domain? or the server_name is ok?

Gredin67 commented 4 years ago

So the bridge is now running https://github.com/YunoHost-Apps/mautrix_whatsapp_ynh/. @Josue-T from the point of view of backup/restore and security, I think we should synchronize between the mautrix bridges and the synapse. Could you have a look at the app? For instance, the whatsappbot requires synapse admin priviledges to be able to group all whatsapp rooms in a matrix community. I ask the question in the manifest if they want to do so. But a better way would be to only give the whatsappbot user the rights to create community.

We should also update the synapse README to link it to mautrix_whatsapp

@Thatoo could you update this issue to give the status of bot integrations, e.g. add a task list and check the whatsapp bridge box.

Thatoo commented 4 years ago

What do you mean by "status of bot integrations"?

yajo commented 4 years ago

If we were to implement a bridge, this one would be a good choice: https://github.com/matrix-org/matrix-bifrost

It uses libpurple, thus supports lots of protocols in a single bridge: https://developer.pidgin.im/wiki/ThirdPartyPlugins

Thatoo commented 3 years ago

As we assist to a big migration from WhatsApp to Signal, it could be nice to get the signal bridge (https://github.com/tulir/mautrix-signal) as we have the matrix bridge. What do you think?

I'm available for testing and helping.

Gredin67 commented 3 years ago

We are currently testing the mautrix_whatsapp_ynh relaybot in production. Up to now it behaves quite ok. Someone is having a look at mautrix-facebook ( could be added to the list in this thread). In order to share my experience, I am planning to do a template package for mautrix bots https://github.com/Gredin67/mautrix_template_ynh

So if someone is interested in packaging signal from the template, it would indeed be nice.

@Yajo can you explain how the matrix-bifrost bridge works and compare what it is able with mautrix-whatsapp ? Is it thought for personal use or can it be used for anonymous relay of rooms too?

yajo commented 3 years ago

@Yajo can you explain how the matrix-bifrost bridge works and compare what it is able with mautrix-whatsapp ?

You can see https://youtu.be/B2vCFAeSUpw for more details on the project. AFAIK its goal is to provide a bridge to rule them all, basing it on top of libpurple, which itself is a nice library that has quite some years of development and already has plugins for lots of chat services.

It is a puppeting bridge though. I'm not sure if it will be able to act as relaybot. If it weren't, of course other bridges would still have their place; but in the case of yunohost users, I think it would be very useful because these servers are usually expected to have just a few users, who could freely login into their networks of preference using a single bridge.

I'll take the freedom to invoke @Half-Shot to see if he can clarify a bit about what's the status and goals of the project, regarding our use case here, which would be packaging it for homeservers.

Is it thought for personal use or can it be used for anonymous relay of rooms too?

I think it's more for personal use, but I'm not sure...

Half-Shot commented 3 years ago

Hi,

The bifrost project has taken some different turns recently to focus on being an XMPP bridge. We would still like to add other protocols into it at some point, and support remains in the codebase to do so -- but XMPP is our goal atm. It's designed to sit alongside a XMPP server and act like a gateway between Matrix and XMPP rather than as a personal bridge.

benneti commented 3 years ago

I tried to change the package for the signal bridge to telegram, building and running works but for some reason I canno get the bot to accept my invite to the chat

https://github.com/benneti/mautrix_telegram_ynh

Gredin67 commented 3 years ago

I'm not a telegram user, so cool that you're taking this over! My quick guess is that the syntax of your permissions in the config is not OK. Too many " " Compare with the permissions in signal or WhatsApp.

Le 22 février 2021 21:44:38 GMT+01:00, benneti notifications@github.com a écrit :

I tried to change the package for the signal bridge to telegram, building and running works but for some reason I canno get the bot to accept my invite to the chat

https://github.com/benneti/mautrix_telegram_ynh

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/YunoHost-Apps/synapse_ynh/issues/170#issuecomment-783662628

-- Envoyé depuis /e/ Mail.

benneti commented 3 years ago

EDIT: nevermind I just had a typo in the botname....

Gredin67 commented 3 years ago

so this would mean signal telegram are packaged!

benneti commented 3 years ago

Yes, but as I see it in signal upgrade and backup probably do not work; in telegram they might but I think not everything works as I would wish for (e.g. no option to upgrade config when the defaults have changed).

Thatoo commented 3 years ago

I've updated the list adding Signal and Telegram package for Yunohost. Thank you for your work by the way. Awesome! Is there others? like IRC? XMPP? SMS? ...?

Thatoo commented 2 years ago

@Gredin67 is it normal we can't join #mautrix_yunohost:matrix.fdn.fr anymore? Are bridges for Signal, WhatsApp and Telegram working on Yunohost 11? Is there any new bridges sinces this list had been created? to IRC? XMPP? or SMS?

Gredin67 commented 2 years ago

signal, facebook and whatsapp are working, don't know about telegram, but it looks actively maintained. No new bridge as far as I know

EDIT : after a quick search I've found :

Don't know anything about their status though...

Thatoo commented 2 years ago

I'll contact devs of these packages and ask them