snikket-im / snikket-server

Image builder for Snikket server
https://snikket.org/service/
Apache License 2.0
275 stars 31 forks source link

Add a web chat client #5

Open KillianKemps opened 4 years ago

KillianKemps commented 4 years ago

I'm quite new to the XMPP ecosystem, but I discovered that there is a web interface for using XMPP and that you already added the conversejs module here.

However, nothing is accessible on chat.example.com/conversejs, it returns me a 404. What is still needed to deploy it? Do we need to add the module name to the configuration file? Is it sufficient?

From what I understand from the documentation there isn't much to be done. So maybe it could be a great improvement to have a web interface and have one XMPP web interface available on all desktops (GNU/Linux, Mac OS and Windows).

mitchellurgero commented 2 years ago

Is this still being looked at?

MaybeThisIsRu commented 2 years ago

Snikket is still early alpha, so I'd think most things including a web client should be thought of over a long span of time.

Converse.js is a good starting point sure, but these things do take time without money and labour. :)

mwild1 commented 2 years ago

Indeed. @mitchellurgero the latest release exposes the necessary interfaces (e.g. websockets) for many XMPP clients (such as Converse.js) to be able to connect to a Snikket instance. But none of the web clients currently have all the features of the native Snikket apps (e.g. audio/video calls, end-to-end encryption, etc.). More info in this FAQ entry.

A web client is firmly on our roadmap, but it would require someone to work on it. Right now I have my hands full with other aspects of the project, but if we can find a willing developer and/or a way to fund someone to work on it, we will. I expect to look harder for options next year (I'm currently busy working on a significant update for the iOS app, and finishing the account import/export functionality - the latter being an EU-funded project with a January deadline).

Hope this helps give some insight into the status of this issue :)

Maastodonte commented 2 years ago

Maybe you should take a look at https://www.jsxc.org/ ;)

I used it back in its early stages for some of my projects with a prosody server and it worked very well and easily !

WillForan commented 9 months ago

mod_conversejs is available in the snikket-sever prosody container! But I can't figure out how to load it

I enter the container like

cont_id=$(docker ps --format "{{.ID}}" --filter ancestor=snikket/snikket-server:stable)
docker exec -it ${cont_id} bash 

And have played around a bit

# conversejs module file exists!
find /etc/prosody/ -iname '*converse*' # /etc/prosody/modules/mod_conversejs

# already tried to modify config to load conversejs
grep conversejs /etc/prosody/prosody.cfg.lua   #   "mod_conversejs";

# also tried in shell
prosodyctl shell
     # "0 hosts" is probably not a good sign
     module:reload("mod_conversejs") # | OK: Module reloaded on 0 hosts

    # cf. successfully reloading a working module
    module:reload("http_files")      # | OK: Module reloaded on 1 host
mwild1 commented 9 months ago
prosodyctl shell module load conversejs

(a shortcut for running module:load("conversejs") when you're actually in the shell - you were close!)

I'm not sure how much further you will get, though, because we only proxy specific URLs to prosody and conversejs is not one of them, so I don't think you'll be able to access it once loaded.

But note that you don't need do load anything in Snikket/Prosody itself You just need to host converse.js somewhere (it's just a bunch of static files) and configure it appropriately. Snikket already exposes the websocket URL and autodiscovery information that Converse.js needs to connect.

A lot of people also use Movim with Snikket (that one isn't just a bunch of static files, but it it also does a lot more).