2022-11-14 19:40:49
2022-11-04 11:42:36
2022-11-04 11:39:42
814429
XMPP/Live-Chat in Friendica
!Friendica Support
Ich weiß, es gibt eine xmpp-Integration in einem Friendica-Addon. Aber so wirklich befriedigend ist die ja nicht.
Wer Peertube als Admin nutzt, kennt wahrscheinlich auch die Funktion des Live-Chats... Die kann über einen externen, aber auch über einen internen integrierten prosody-XMPP-Server realisiert werden.
Wäre sowas nicht auch für Friendica sinnvoll? Ein mit einem Addon mitgelieferter XMPP-Server... Den müsste man ja auch so konfigurieren können, dass dieser auch föderiert.
Und die User dieses Servers sind die Friendica-User.
So könnten ja - zumindest anfangs - alle Friendica-User aller Friendica-Instanzen einen Live-Chat analog dem Facebook-Messenger, miteinander auch in Chat-Kontakt treten. Omemo-Verschlüsselt versteht sich natürlich.
Und wenn das gut funktioniert, können und werden wohl auch andere Projekte diese Idee übernehmen...
Und warum XMPP?
Weil es deutlich ressourcen-schonender als Matrix-Server ist.
Mit Snikket gäbe es ja auch schon ein schön vorkonfiguriertes Projekt dazu...
Ich weiß, es gibt eine xmpp-Integration in einem Friendica-Addon. Aber so wirklich befriedigend ist die ja nicht.
Wer Peertube als Admin nutzt, kennt wahrscheinlich auch die Funktion des Live-Chats... Die kann über einen externen, aber auch über einen internen integrierten prosody-XMPP-Server realisiert werden.
Wäre sowas nicht auch für Friendica sinnvoll? Ein mit einem Addon mitgelieferter XMPP-Server... Den müsste man ja auch so konfigurieren können, dass dieser auch föderiert.
Und die User dieses Servers sind die Friendica-User.
So könnten ja - zumindest anfangs - alle Friendica-User aller Friendica-Instanzen einen Live-Chat analog dem Facebook-Messenger, miteinander auch in Chat-Kontakt treten. Omemo-Verschlüsselt versteht sich natürlich.
Und wenn das gut funktioniert, können und werden wohl auch andere Projekte diese Idee übernehmen...
Und warum XMPP?
Weil es deutlich ressourcen-schonender als Matrix-Server ist.
Mit Snikket gäbe es ja auch schon ein schön vorkonfiguriertes Projekt dazu...
Michael Vogel
•jakob 🇦🇹 ✅
•Meine Idee dahinter ist, dass mit der Installation von Friendica (bzw. dem addon) sofort ein fertig konfigurierter XMPP-Server mit der Userbasis dieser Instanz vorhanden ist. Mit sozusagen single-sign-on.
Ich melde mich in friendica an und bin auch im XMPP-Server schon eingeloggt.
Und um mit einem User einer anderen Instanz in einen Chat zu gehen, klicke ich bei dem nur auf ein Chat-Symbol und schon geht der Chat mit dem User auf, weil dieser ebenfalls einen XMPP-Account bei seinem Service hat.
Und damit ich vom Smartphone auch Chatten kann, kann ich ja die Multi-Account-Fähigkeit von z.B. conversations nutzen.
Als Frontend sollte converse.js oder jsxc klappen. Das müsste halt "nur" mit dem XMPP-Server in das Addon-gepackt werden.
Was mich an den XMPP-Frontends für Websiten stört, wenn ich mich mit meinem "HauptAccount" für xmpp einlogge, dass ich den ganzen Verlag an Räumen und Usern mit dabei habe, die ich in Friendica z.B. gar nicht bräuchte... da sind eh genügend potent... show more
Meine Idee dahinter ist, dass mit der Installation von Friendica (bzw. dem addon) sofort ein fertig konfigurierter XMPP-Server mit der Userbasis dieser Instanz vorhanden ist. Mit sozusagen single-sign-on.
Ich melde mich in friendica an und bin auch im XMPP-Server schon eingeloggt.
Und um mit einem User einer anderen Instanz in einen Chat zu gehen, klicke ich bei dem nur auf ein Chat-Symbol und schon geht der Chat mit dem User auf, weil dieser ebenfalls einen XMPP-Account bei seinem Service hat.
Und damit ich vom Smartphone auch Chatten kann, kann ich ja die Multi-Account-Fähigkeit von z.B. conversations nutzen.
Als Frontend sollte converse.js oder jsxc klappen. Das müsste halt "nur" mit dem XMPP-Server in das Addon-gepackt werden.
Was mich an den XMPP-Frontends für Websiten stört, wenn ich mich mit meinem "HauptAccount" für xmpp einlogge, dass ich den ganzen Verlag an Räumen und Usern mit dabei habe, die ich in Friendica z.B. gar nicht bräuchte... da sind eh genügend potentielle User aus meiner Kontaktliste.
Die Fediverse-ID ist gleichzeitig auch die XMPP-ID für den Fediverse-Chat... damit ist ein automatisches Connecten möglich...
jakob 🇦🇹 ✅
•Wenn ich in Peertube eingeloggt bin, und auf ein Video mit Live-Chat gehe, dann bin ich automatisch mit meinem Peertube-User im Chat eingeloggt.
Falgn0n The Wizard
•I don't understand german so I have no idea what you have said so far - but I am 100% adding my +1 vote to adding/enabling #XMPP #chat into #Friendica.
Even if it is as simple as adding some javascript, ie: #ConverseJS
jakob 🇦🇹 ✅
•Peertube brings a livechat-addon. Which includes a xmpp-server (prosody - preconfigured for only local usage).
You can enable muc for different videos. And you are logged in into xmpp, when you watch such a video with livechat enabled. Your jabber-id is your peertube user-id.
Unauthenticated users in peertube can choose a username in xmpp-chat.
So... if there is an addon for frirndica, which brings it's own xmpp-server the same as in Peertube. Also preconfigured. Easy installable as snikket, and all friendica-users are also xmpp-users for this local xmpp-server.
And a modified conversejs or jsxc webclient can give you live-chat with users from your instance. The ui must be enhanced, that you can click on "chat" in a user-profile (even the small window on hoovering over a username) oprns a chat-window for this user.
AND... when this xmpp-server has federation enabled, the same works for all users on other instaces too...
If it's bundled with friendica-installation, all frirndica-servers are xmpp-servers too... show more
Peertube brings a livechat-addon. Which includes a xmpp-server (prosody - preconfigured for only local usage).
You can enable muc for different videos. And you are logged in into xmpp, when you watch such a video with livechat enabled. Your jabber-id is your peertube user-id.
Unauthenticated users in peertube can choose a username in xmpp-chat.
So... if there is an addon for frirndica, which brings it's own xmpp-server the same as in Peertube. Also preconfigured. Easy installable as snikket, and all friendica-users are also xmpp-users for this local xmpp-server.
And a modified conversejs or jsxc webclient can give you live-chat with users from your instance. The ui must be enhanced, that you can click on "chat" in a user-profile (even the small window on hoovering over a username) oprns a chat-window for this user.
AND... when this xmpp-server has federation enabled, the same works for all users on other instaces too...
If it's bundled with friendica-installation, all frirndica-servers are xmpp-servers too and all friendica-users from all instances can livechat with all others... instantly.
I think, facebook-chat in the webapp works with such a xmpp-solution and a modified conversejs or jsxc. It looks very similar...
And facebook-chat/messenger was xmpp and federated with the xmpp-network before... so i think its still simple xmpp...
This builtin in friendica can boost livechat this way in other fediverse-projects as well...
AND you can use this accound additionally or as your main account in conversations or siskin or gajim.. as well.
Falgn0n The Wizard
•I already have a prosody that authenticates against my friendica, using this:
Works great. Once you have an account in friendica, you can simply login to any XMPP client with the same credentials.
So all I would really need is a chat widget in the friendica interface that automatically authenticates me.
jakob 🇦🇹 ✅
•Can you please describe it a little more?
And if it really works that easy... there must be better integration of a webclient in friendica...
Falgn0n The Wizard
•Not sure how much more there is to say.
Install #Prosody as per usual, and use http_async for the auth method instead of "internal hashed".
I basically just reviewed the instructions for doing this with #eJabberd -> https://wiki.friendi.ca/docs/install-ejabberd (and adapted for Prosody - although I see now that they have actually included the prosody instructions there as well).
jakob 🇦🇹 ✅
•http_async seems to be a module.
But in Debian it ist not in the package prosody_modules...
where do i get it from?
Steffen K9 🐰
•jakob 🇦🇹 ✅
•But i'm wondering, why this module is not in debian... 🤷♂️
But i was too tired yesterday to work on it longer.
Is this a single sign on or does it only use the userbase from friendica?
If i use a conversejs in friendica, i have to login extra?
And... is there a pissibility, to feed the roster with my followings/followers/contacts?
Falgn0n The Wizard
•I don't think you can populate your xmpp roster with friendica contacts? It will only pick your existing XMPP contacts?
But would be very cool if it could "find" the xmpp:// link of all your fedi contacts and add them to your xmpp roster :D
Do you aim to add conversejs to friendica? how would you do this? You would have to add/inject the javascript into the php page somewhere or something, maybe write an addon (which I would if I had the knowledge)
(not a dev! forgive my ignorance with these things)
jakob 🇦🇹 ✅
•Every friendica-instance (and later every fediverse-indtance) has a builtin xmmp-server.
So every fediverse-id is also a xmpp-id.
You do not need tor grab an xmpp-id from the bio or frim elswhere... just use the fedi-handle.
✌️
Falgn0n The Wizard
•https://prosody.im/community_modules
jakob 🇦🇹 ✅
•And is it a SSO, or doi have to login extra?
Or can i make autologin, when i login in friendica?
Falgn0n The Wizard
•No, you have to login yourself using your Friendica credentials, no SSO/autologin.
That was kinda my point: a (js?) xmpp chat widget in Friendica would immediately be wonderful (there is/was an addon based on jsxc, but it has been abandoned for some time now)
- but if that widget auto-logged me in, would be even better.
As of now - nope: just login to conversations/gajim/etc... using the same credentials.
Sorry if I came across as obtuse before now, I was not clear on your objective - I thought you were simply researching this as a potential "solution" to built-in xmpp chat for Friendica.
So for my #Prosody install I hg clone the community modules and include that dir in "plugin_paths" in prosody.cfg.lua, plus enable the module and change the authentication mechanism from "internal_hashed" to "http_async" with the refer... show more
No, you have to login yourself using your Friendica credentials, no SSO/autologin.
That was kinda my point: a (js?) xmpp chat widget in Friendica would immediately be wonderful (there is/was an addon based on jsxc, but it has been abandoned for some time now)
- but if that widget auto-logged me in, would be even better.
As of now - nope: just login to conversations/gajim/etc... using the same credentials.
Sorry if I came across as obtuse before now, I was not clear on your objective - I thought you were simply researching this as a potential "solution" to built-in xmpp chat for Friendica.
So for my #Prosody install I hg clone the community modules and include that dir in "plugin_paths" in prosody.cfg.lua, plus enable the module and change the authentication mechanism from "internal_hashed" to "http_async" with the reference to the specified json file ->
jakob 🇦🇹 ✅
•So it dhould work somehow.
Falgn0n The Wizard
•ok, but how about we up the ante:
I have a Friendica and a Peertube.
- Of course the PT is on a subdomain with its own separate login and a different handle (user@peertube.frndomain.tld vs user@frndomain.tld)
What if the xmpp in PT can authenticate with Friendica (which is at the main domain). That way I can share a single XMPP handle across both of those?
:D
lol - perhaps I expect too much.
jakob 🇦🇹 ✅
•But...
What if you have only one friendica- or mastodob-account.
It works.
Most users have just one fediverse-account.
On the other side, my xmpp-server runs on xmpp.schuerz.at, but my jabber-id is jakob@schuerz.at
Jabber can handle this.
Falgn0n The Wizard
•Mathias Hellquist (Friendica)
•However, all of what I just said is very easy to type. Not as easy to implement and do. Even harder to get all the services to agree to. So for now that is just my "IMHO". :)
jakob 🇦🇹 ✅
•Look at the big ones... facebook for example... yes my history has a long time as a facebook-user.
And there i have the possibility to chat with other users. Just klick on the users profile a button named "Chat" or so. Then a small window on the bottom opens, and i can send a chat-request to this user, and if this user wants to chat with me, he allows to chat, and we can chat.
And if you want, you can use this account also with your fb-messenger-app on your android/iOS
It really looks almost the same, as you can realize with conversejs now. What is needed is the following:
- a xmpp-server where i get automatically logged in, when i login into friendica
- conversejs integreted with colors of you friendica-theme.
- a button on each friendica-contact to start a chat with this user
Peertube almost do it.
It has a brought along xmpp-server, where you are logged in, if you log into your peertube-account. Your JID on this xmpp-server (prosody, it's... show more
Look at the big ones... facebook for example... yes my history has a long time as a facebook-user.
And there i have the possibility to chat with other users. Just klick on the users profile a button named "Chat" or so. Then a small window on the bottom opens, and i can send a chat-request to this user, and if this user wants to chat with me, he allows to chat, and we can chat.
And if you want, you can use this account also with your fb-messenger-app on your android/iOS
It really looks almost the same, as you can realize with conversejs now. What is needed is the following:
- a xmpp-server where i get automatically logged in, when i login into friendica
- conversejs integreted with colors of you friendica-theme.
- a button on each friendica-contact to start a chat with this user
Peertube almost do it.
It has a brought along xmpp-server, where you are logged in, if you log into your peertube-account. Your JID on this xmpp-server (prosody, it's delivered together with the live-chat plugin) is your peertube-fediverse-ID.
It just needs additional conversejs, federation and a button on every contact to start a chat.
The peertube plugin starts a MUC (Groupchat) on every video, where it is allowed to have livechat. Have you tried this? No? Try it.
In this video i have live-chat enabled
https://kino.schuerz.at/w/b3165bb6-40e1-4044-8b94-373a2d5c5b05
This is the prosody brought with installing the live-chat addon in peertube. You can use is anonymous (just set a username for the chat).
When i write logged in in peertube, you can see my peertube-user as xmpp-user.
I wrote a Hello to you in the chat there.