GithubHelp home page GithubHelp logo

johnxlivingston / peertube-plugin-livechat Goto Github PK

View Code? Open in Web Editor NEW
88.0 88.0 26.0 174.13 MB

License: GNU Affero General Public License v3.0

JavaScript 12.63% HTML 0.11% TypeScript 71.15% Lua 9.57% SCSS 5.06% Shell 1.49%

peertube-plugin-livechat's People

Contributors

agates avatar automcoding avatar boffire avatar chocobozzz avatar framabot avatar fusengum avatar gamemap avatar johnxlivingston avatar lost-geographer avatar mejans avatar milotype avatar mkljczk avatar mose avatar murazaki avatar opna2608 avatar porrumentzio avatar povoq avatar resoli avatar rigelk avatar rnek0 avatar treora avatar tytan652 avatar vintprox avatar weblate avatar yekrats avatar zash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

peertube-plugin-livechat's Issues

Prosody: not loading chat

Describe the bug
After upgrade livechat from v2.0.3 to 2.2.0 not loading chat.

Diagnostic:

Starting tests: OK
Browser: OK
Backend connection: OK
Webchat activated on videos: OK
Chat will open automatically
Displaying «open in new window» button
Chat will only be available for local videos
Chat is enabled for all lives.
Webchat type: OK
Using builtin Prosody
Builtin Prosody and ConverseJS: OK
The working dir is: /tmp/peertube-plugin-livechat-josd0306cr
Prosody will run on port '52800'
Prosody modules path will be '/var/lib/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/prosody-modules'
The prosody configuration file (/tmp/peertube-plugin-livechat-josd0306cr/prosody.cfg.lua) exists
Prosody configuration file content is correct.
Pid file /tmp/peertube-plugin-livechat-josd0306cr/prosody.pid found
Prosodyctl status: Prosody is running with PID 78509
The prosody configuration file (/tmp/peertube-plugin-livechat-josd0306cr/prosody.cfg.lua) exists
Prosody configuration file content is correct.
Prosody version is 0.11.8
Additional debugging information
Current prosody configuration
daemonize = false;
allow_registration = false;
admins = {
};
pidfile = "/tmp/peertube-plugin-livechat-josd0306cr/prosody.pid";
plugin_paths = {
  "/var/lib/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/prosody-modules";
};
data_path = "/tmp/peertube-plugin-livechat-josd0306cr/data";
storage = "internal";
modules_enabled = {
  "roster";
  "saslauth";
  "carbons";
  "version";
  "uptime";
  "ping";
  "bosh";
  "posix";
};
modules_disabled = {
  "s2s";
};
cross_domain_bosh = false;
consider_bosh_secure = true;
cross_domain_websocket = false;
consider_websocket_secure = false;
c2s_require_encryption = false;
interfaces = {
  "127.0.0.1";
  "::1";
};
c2s_ports = {
};
c2s_interfaces = {
  "127.0.0.1";
  "::1";
};
s2s_ports = {
};
s2s_interfaces = {
  "127.0.0.1";
  "::1";
};
http_ports = {
  "52800";
};
http_interfaces = {
  "127.0.0.1";
  "::1";
};
https_ports = {
};
https_interfaces = {
  "127.0.0.1";
  "::1";
};
archive_expires_after = "1w";
log = {
  info = "/tmp/peertube-plugin-livechat-josd0306cr/prosody.log";
  error = "/tmp/peertube-plugin-livechat-josd0306cr/prosody.err";

};



VirtualHost "test2.local"
  authentication = "http";
  modules_enabled = {
  "ping";
  "auth_http";
  "http";
  "bosh";
};
  http_auth_url = "https://test2.local/plugins/livechat/router/api/user";
  trusted_proxies = {
  "127.0.0.1";
  "::1";
};
  allow_anonymous_s2s = false;
  http_host = "test2.local";
  http_external_url = "http://test2.local";


VirtualHost "anon.test2.local"
  authentication = "anonymous";
  modules_enabled = {
  "ping";
  "http";
  "bosh";
};
  trusted_proxies = {
  "127.0.0.1";
  "::1";
};
  allow_anonymous_s2s = false;
  http_host = "test2.local";
  http_external_url = "http://test2.local";


Component "room.test2.local" "muc"
  muc_room_locking = false;
  muc_tombstones = false;
  muc_room_default_language = "en";
  muc_room_default_public = false;
  muc_room_default_persistent = false;
  muc_room_default_members_only = false;
  muc_room_default_moderated = false;
  muc_room_default_public_jids = false;
  muc_room_default_change_subject = false;
  muc_room_default_history_length = 20;
  restrict_room_creation = false;
  modules_enabled = {
  "muc_http_defaults";
};
  muc_create_api_url = {
  "https://test2.local/plugins/livechat/router/api/room?apikey=s9v114480m&jid={room.jid|jid_node}";
};


Prosody version
Prosody 0.11.8

# Prosody directories
Data directory:     /tmp/peertube-plugin-livechat-josd0306cr/data
Config directory:   /tmp/peertube-plugin-livechat-josd0306cr
Source directory:   /nix/store/jjnhd7raxh4wz406q8z6dv6vl89111c3-prosody-0.11.8/lib/prosody
Plugin directories:
  /var/lib/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/prosody-modules
  /nix/store/jjnhd7raxh4wz406q8z6dv6vl89111c3-prosody-0.11.8/lib/prosody/modules/
  

# Lua environment
Lua version:             	Lua 5.2

Lua module search paths:
  /nix/store/jjnhd7raxh4wz406q8z6dv6vl89111c3-prosody-0.11.8/lib/prosody/?.lua
  /nix/store/0xq1i744vxi9d72wpmn0y9dx33p9zwyh-lua5.2-luasocket-3.0rc1-2/share/lua/5.2/?.lua
  /nix/store/0xq1i744vxi9d72wpmn0y9dx33p9zwyh-lua5.2-luasocket-3.0rc1-2/share/lua/5.2/?/init.lua
  /nix/store/scr51cv01jy23n4dzz6nagiyzppmdgrp-lua5.2-luasec-0.9-1/share/lua/5.2/?.lua
  /nix/store/scr51cv01jy23n4dzz6nagiyzppmdgrp-lua5.2-luasec-0.9-1/share/lua/5.2/?/init.lua
  /nix/store/0zx7nmkrra1w6akrwxrj19sfhny8kbgc-lua5.2-luaexpat-1.3.0-1/share/lua/5.2/?.lua
  /nix/store/0zx7nmkrra1w6akrwxrj19sfhny8kbgc-lua5.2-luaexpat-1.3.0-1/share/lua/5.2/?/init.lua
  /nix/store/dysb0dbqyc3iqd2mn7rdqr0lgcdpqi68-lua5.2-luaevent-0.4.6-1/share/lua/5.2/?.lua
  /nix/store/dysb0dbqyc3iqd2mn7rdqr0lgcdpqi68-lua5.2-luaevent-0.4.6-1/share/lua/5.2/?/init.lua
  /nix/store/sxv281cws4v50jzcmalqn8kb34wsslza-lua5.2-luadbi-0.7.2-1/share/lua/5.2/?.lua
  /nix/store/sxv281cws4v50jzcmalqn8kb34wsslza-lua5.2-luadbi-0.7.2-1/share/lua/5.2/?/init.lua

Lua C module search paths:
  /nix/store/jjnhd7raxh4wz406q8z6dv6vl89111c3-prosody-0.11.8/lib/prosody/?.so
  /nix/store/0xq1i744vxi9d72wpmn0y9dx33p9zwyh-lua5.2-luasocket-3.0rc1-2/lib/lua/5.2/?.so
  /nix/store/scr51cv01jy23n4dzz6nagiyzppmdgrp-lua5.2-luasec-0.9-1/lib/lua/5.2/?.so
  /nix/store/0zx7nmkrra1w6akrwxrj19sfhny8kbgc-lua5.2-luaexpat-1.3.0-1/lib/lua/5.2/?.so
  /nix/store/hb205z09hw293kw6jfgwsf00n8x44rii-lua5.2-luafilesystem-1.7.0-2/lib/lua/5.2/?.so
  /nix/store/qa4i344fivn4k2fyrqmplxxbflg2d9bd-lua5.2-luabitop-1.0.2-3/lib/lua/5.2/?.so
  /nix/store/dysb0dbqyc3iqd2mn7rdqr0lgcdpqi68-lua5.2-luaevent-0.4.6-1/lib/lua/5.2/?.so
  /nix/store/lb4pn6vmzjs9f6sbwfy5mvj7g1qmjsq2-lua5.2-luadbi-sqlite3-0.7.2-1/lib/lua/5.2/?.so

LuaRocks:        	Not installed

# Network

Backend: select

# Lua module versions
DBI:     	0.7
lfs:     	LuaFileSystem 1.7.0
libevent:	2.1.12-stable
luaevent:	0.4.6
lxp:     	LuaExpat 1.3.0
socket:  	LuaSocket 3.0-rc1
ssl:     	0.9

Please do a video walk-through from a clean instance to having a fully working peertube-livechat plugin working.

Is your feature request related to a problem? Please describe.
The documentation, although updated and more clear than before, is still not clear enough to get a running server. Please do a quick video screenscapture of the installation and configuration of LIVECHAT to help put a stop to all of the confusion.

Describe the solution you'd like
A simple video that runs through all of the documentation and shows a "completed product" in order to capture some nuance or detail that may have slipped past the documentation.

Describe alternatives you've considered
Doing a video myself, but I have had issues with configuration so far.

Additional context
N/A

Docker image with specific PeerTube tag

Is your feature request related to a problem? Please describe.
When using the docker image johnxlivingston/peertubelivechat the last PeerTube release is not re-build, I get the v3.2.0.

Describe the solution you'd like
Using an image for each release with tags: v3.3.0-buster, v3.4.0-buster...

Describe alternatives you've considered
Maybe re-building the docker image for each PeerTube release.

Possibility to make chat only for registered users

Is your feature request related to a problem? Please describe.
The problem could show up while there are more chat users, when the chat does not require an account it could potentially cause a mess and spam

Describe the solution you'd like
Some message telling the user to log in/register in order to chat in the livechat, the great example of such solution would be twitch/youtube

Describe alternatives you've considered
I didnt consider any alternatives yet

Additional context
This would be useful for bigger instances aswell as making it easier to moderate the chat

Builtin Prosody: call APIs on localhost

The builtin Prosody server calls some API on the Peertube's plugin.
These API are called by the public url. So it goes through nginx on a production server.
It would be more efficient to call API directly on the Peertube server (read the config to get the uri with the correct port). It should not be a problem, as we are on the same host.

NB: see how to add a test in the diagnostic tool, for checking that prosody can request APIs.

Reference: related to NlNet-task-10

the chat wont load

Describe the bug
Basically the chat does not load for me, the http-bind request ends up in 404 Unknown host: localhost

To Reproduce
Steps to reproduce the behavior:

  1. Install the plugin
  2. Use prodsy
    Boom! it doesnt work in my case

Expected behavior
The chat loads fine

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Opera GX
  • Version 3.0.0

Smartphone (please complete the following information):

Additional context

Link to xmpp room

A link to open an external app for chats, for example:

xmpp:{{ROOM}}?join

when the user puts the lives on a peertube

Diagnostic tool: Add prosody error logs

Is your feature request related to a problem? Please describe.

In the diagnostic tools, when using builtin prosody, include last lines from the prosody error log file.

Impopssible to join chat

Describe the bug
Impossible to join chat

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'a video or live'
  2. Click on 'enter groupchat'
  3. See error in console browser

Expected behavior
have the chat that works

Screenshots
Sans titre

Server (please complete the following information):

  • OS version [e.g. Debian 10, ...]: Unraid
  • Peertube version: 3.2.1
  • Peertube installation type [e.g. standard, docker, ...]: Docker
  • peertube-plugin-livechat version: 3.1.0

Plugin diagnostic:
Sans titre

Desktop (please complete the following information):

  • OS: [e.g. iOS] Windows 10
  • Browser [e.g. chrome, safari] Chrome & Edge
  • Version [e.g. 22] Chrome: 91.0.4472.124 Edge: 91.0.864.59

Additional context
Add any other context about the problem here.

ConverseJS: issue connecting with YunoHost and Metronome

Describe the bug
When attempting to connect the Livechat plugin to an existing server using YunoHost, the connection currently fails. This might be caused because YunoHost uses Metronome as its XMPP engine instead of Prosody.

To Reproduce
Steps to reproduce the behavior:

  1. Install YunoHost (assuming a base URL of https://www.example.net)
  2. As the BOSH URI is not exposed directly by YunoHost, install the Redirect app with the following settings:
    • Domain: example.net
    • Path to install: /http-bind
    • Redirect destination path: http://localhost:5290/http-bind
    • Redirect type: "Proxy, invisible (nginx proxy_pass). Everybody will be able to access it."
  3. Install Peertube (assuming a subdomain of https://peertube.example.net for the case below)
  4. Install the Livechat plugin
  5. Configure the plugin to use the Metronome server bundled by YunoHost with the following settings:
    • XMPP service server: example.net
    • XMPP room template: public_{{VIDEO_UUID}}@muc.example.net (the muc prefix is automatically generated by YunoHost)
    • BOSH URI: http://example.net/http-bind
  6. The following error appears when launching the diagnosis tool at https://peertube.example.net/plugins/livechat/2.3.1/router/settings/diagnostic:
{"error":"Token is invalid.","code":"invalid_request"}

Expected behavior
The diagnosis tool should detect the existing Metronome XMPP server and use it as the default.

Desktop (please complete the following information):

  • OS: Windows 10 on desktop, Debian Stable on server
  • Browser: Tested on Firefox, but as it's a server-side issue, it should happen in all browsers
  • Version: Tested on Firefox 89

Additional context
YunoHost has a hard dependency on Metronome, so attempting to install Prosody instead requires deleting YunoHost and all the apps it currently handles.

Better buttons UX

Find a way to nicely display buttons.

The «open chat» button should be more visible.

Have a dropdown for the «open in new window» button?

Builtin Prosody: display an error message when the video no longer exists.

Describe the bug
When accessing a chatroom for which the video no longer exists, we have a blank page. Should display a message.

  • Create a proper 404 page for the livechat endpoint
  • Create a proper 404 page for the new livechat angular route
  • Also create a 403 page (for example for anonymous users, when chat disabled for them)

Reference: NlNet-task-21

Openfire connection not working

Describe the bug
I failed to configure the Prosody server, But I successfully installed the Openfire server and activated an anonymous connection to the server. Programs (for example Jabber or Wime or Pidgin) connect to the server successfully! But the Peertube plugin does not want to connect to the server.

To Reproduce
After installing the server, I activated anonymous connection. I created a permanent room with the address [email protected].
In the plugin settings, I specified the server address and also added a line with the address of the public conference [email protected].
Plugin won't connect

Screenshots
Screenshot_1
Screenshot_2
Screenshot_3
Screenshot_4

Builtin ConverseJS: hide/show muc participants

The show/hide muc participants functionality for Builtin ConverseJS is not working properly.
It seems that ConverseJS remembers the user choice... So the value depending on «isInIframe» is not working.

Better settings screen UX

The plugin settings screen should by dynamical. Depending on several choices, some settings should be hidden.

Rejected by API

I've been tearing my hair out for like a week trying to resolve this.
I've checked other previous open and closed issues that looked similar to my issue and tried their resolutions (such as replacing the peertube url for API calls) to no success. when I use localhost:9000 (or 127.0.0.1:9000) the diagnostic says error 500, internal server error however when I leave the box blank I get the following diagnostic

Diagnostic

    Starting tests: OK
    Browser: OK
    Backend connection: OK
    Webchat activated on videos: OK
        Chat will open automatically
        Displaying «open in new window» button
        Chat is enabled for all lives.
    Webchat type: OK
        Using builtin Prosody
    Builtin Prosody and ConverseJS: KO
        The working dir is: /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody
        Prosody will run on port '52801'
        Prosody will use https://tv.poa.st/plugins/livechat/4.0.1/router/api/ as base uri from api calls
        Prosody modules path will be '/var/www/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/prosody-modules'
        Prosody rooms will be grouped by 'video'.
        The prosody configuration file (/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.cfg.lua) exists
        Prosody configuration file content is correct.
        Pid file /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.pid found
        Prosodyctl status: Prosody is running with PID 271111
        The prosody configuration file (/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.cfg.lua) exists
        Prosody configuration file content is correct.
        Prosody version is 0.11.4
        API Peertube -> Prosody is OK
        API Prosody -> Peertube is KO. Response was: {"ok":false,"error":"Rejected by API"}

Additional debugging information
Current prosody configuration
daemonize = false;
allow_registration = false;
admins = {
};
pidfile = "/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.pid";
plugin_paths = {
  "/var/www/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/prosody-modules";
};
data_path = "/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/data";
default_storage = "internal";
storage = "internal";
modules_enabled = {
  "roster";
  "saslauth";
  "carbons";
  "version";
  "uptime";
  "ping";
  "bosh";
  "posix";
};
modules_disabled = {
  "s2s";
};
cross_domain_bosh = false;
consider_bosh_secure = true;
cross_domain_websocket = false;
consider_websocket_secure = false;
c2s_require_encryption = false;
interfaces = {
  "127.0.0.1";
  "::1";
};
c2s_ports = {
  "52802";
};
c2s_interfaces = {
  "127.0.0.1";
  "::1";
};
s2s_ports = {
};
s2s_interfaces = {
  "127.0.0.1";
  "::1";
};
http_ports = {
  "52801";
};
http_interfaces = {
  "127.0.0.1";
  "::1";
};
https_ports = {
};
https_interfaces = {
  "127.0.0.1";
  "::1";
};
log = {
  info = "/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.log";
  error = "/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.err";

};



VirtualHost "tv.poa.st"
  authentication = "http";
  modules_enabled = {
  "ping";
  "auth_http";
  "http";
  "bosh";
};
  http_auth_url = "https://tv.poa.st/plugins/livechat/4.0.1/router/api/user";
  trusted_proxies = {
  "127.0.0.1";
  "::1";
};
  allow_anonymous_s2s = false;
  http_host = "tv.poa.st";
  http_external_url = "http://tv.poa.st";


VirtualHost "anon.tv.poa.st"
  authentication = "anonymous";
  modules_enabled = {
  "ping";
  "http";
  "bosh";
};
  trusted_proxies = {
  "127.0.0.1";
  "::1";
};
  allow_anonymous_s2s = false;
  http_host = "tv.poa.st";
  http_external_url = "http://tv.poa.st";


Component "room.tv.poa.st" "muc"
  muc_room_locking = false;
  muc_tombstones = false;
  muc_room_default_language = "en";
  muc_room_default_public = false;
  muc_room_default_persistent = true;
  muc_room_default_members_only = false;
  muc_room_default_moderated = false;
  muc_room_default_public_jids = false;
  muc_room_default_change_subject = false;
  muc_room_default_history_length = 20;
  restrict_room_creation = false;
  http_host = "tv.poa.st";
  http_external_url = "http://tv.poa.st";
  modules_enabled = {
  "muc_http_defaults";
  "muc_mam";
  "muc_moderation";
  "http_peertubelivechat_list_rooms";
  "http_peertubelivechat_test";
};
  muc_create_api_url = {
  "https://tv.poa.st/plugins/livechat/4.0.1/router/api/room?apikey=thptoy495h&jid={room.jid|jid_node}";
};
  muc_log_by_default = true;
  muc_log_presences = true;
  log_all_rooms = true;
  muc_log_expires_after = "1w";
  muc_log_cleanup_interval = 14400;
  peertubelivechat_list_rooms_apikey = "thptoy495h";
  peertubelivechat_test_apikey = "thptoy495h";
  peertubelivechat_test_peertube_api_url = "https://tv.poa.st/plugins/livechat/4.0.1/router/api/test?apikey=thptoy495h";


Prosody version
Prosody 0.11.4

# Prosody directories
Data directory:     /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/data
Config directory:   /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody
Source directory:   /usr/lib/prosody
Plugin directories:
  /var/www/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/prosody-modules
  /usr/lib/prosody/modules/
  

# Lua environment
Lua version:             	Lua 5.2

Lua module search paths:
  /usr/lib/prosody/?.lua
  /usr/local/share/lua/5.2/?.lua
  /usr/local/share/lua/5.2/?/init.lua
  /usr/local/lib/lua/5.2/?.lua
  /usr/local/lib/lua/5.2/?/init.lua
  /usr/share/lua/5.2/?.lua
  /usr/share/lua/5.2/?/init.lua

Lua C module search paths:
  /usr/lib/prosody/?.so
  /usr/local/lib/lua/5.2/?.so
  /usr/lib/x86_64-linux-gnu/lua/5.2/?.so
  /usr/lib/lua/5.2/?.so
  /usr/local/lib/lua/5.2/loadall.so

LuaRocks:        	Not installed

# Network

Backend: select

# Lua module versions
DBI:     	0.7
lfs:     	LuaFileSystem 1.7.0
libevent:	2.1.11-stable
luaevent:	0.4.6
lxp:     	LuaExpat 1.3.0
socket:  	LuaSocket 3.0-rc1
ssl:     	0.9

the chat loads when I'm logged out and my username does not contain a capital like this issue

edit here is prosody.err log for this morning in regards to peertubelivechat

Sep 15 08:30:38 http.server     error   Traceback[httpserver]: /usr/lib/prosody/net/resolvers/basic.lua:71: attempt to concatenate local 'conn_type' (a nil value)
stack traceback:
        /usr/lib/prosody/net/resolvers/basic.lua:71: in function 'new'
        /usr/lib/prosody/net/http.lua:263: in function </usr/lib/prosody/net/http.lua:184>
        (...tail calls...)
        ...peertubelivechat_test/mod_http_peertubelivechat_test.lua:52: in function <...peertubelivechat_test/mod_http_peertubelivechat_test.lua:48>
        (...tail calls...)
        /usr/lib/prosody/util/events.lua:79: in function </usr/lib/prosody/util/events.lua:75>
        (...tail calls...)
        /usr/lib/prosody/net/http/server.lua:248: in function </usr/lib/prosody/net/http/server.lua:176>
        [C]: in function 'xpcall'
        /usr/lib/prosody/net/http/server.lua:108: in function 'process_next'
        /usr/lib/prosody/net/http/server.lua:124: in function 'success_cb'
        /usr/lib/prosody/net/http/parser.lua:177: in function 'feed'
        /usr/lib/prosody/net/http/server.lua:155: in function </usr/lib/prosody/net/http/server.lua:154>
        (...tail calls...)
        /usr/lib/prosody/net/server_select.lua:915: in function </usr/lib/prosody/net/server_select.lua:899>
        [C]: in function 'xpcall'
        /usr/bin/prosody:80: in function 'loop'
        /usr/bin/prosody:90: in main chunk
        [C]: in ?

any thoughts?

Keep getting 404 errors when trying to load the plugin

Hi! I'm trying to use the plugin with the built in prosody setup, however I keep getting a 404 error with bosh.js
"bosh.js:738 POST https://yoba.tv/plugins/livechat/3.2.0/router/webchat/http-bind 404"
Here is my diagnostic output :

Diagnostic
Starting tests: OK
Browser: OK
Backend connection: OK
Webchat activated on videos: OK
Chat will open automatically
Displaying «open in new window» button
Chat will only be available for local videos
Chat can be enabled on live videos.
Chat is enabled for all lives.
Chat is enabled for all non-lives.
Webchat type: OK
Using builtin Prosody
Builtin Prosody and ConverseJS: KO
The working dir is: /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody
Prosody will run on port '52800'
Prosody will use https://yoba.tv/plugins/livechat/3.2.0/router/api/ as base uri from api calls
Prosody modules path will be '/var/www/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/prosody-modules'
The prosody configuration file (/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.cfg.lua) exists
Prosody configuration file content is correct.
Pid file /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.pid found
Prosodyctl status: Prosody is running with PID 1605
The prosody configuration file (/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.cfg.lua) exists
Prosody configuration file content is correct.
Prosody version is 0.11.9
Error when calling Prosody test api (test-peertube-prosody): HTTPError: Response code 404 (Not Found)
Additional debugging information
Current prosody configuration
daemonize = false;
allow_registration = false;
admins = {
};
pidfile = "/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.pid";
plugin_paths = {
  "/var/www/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/prosody-modules";
};
data_path = "/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/data";
default_storage = "internal";
storage = "internal";
modules_enabled = {
  "roster";
  "saslauth";
  "carbons";
  "version";
  "uptime";
  "ping";
  "bosh";
  "posix";
};
modules_disabled = {
  "s2s";
};
cross_domain_bosh = false;
consider_bosh_secure = true;
cross_domain_websocket = false;
consider_websocket_secure = false;
c2s_require_encryption = false;
interfaces = {
  "127.0.0.1";
  "::1";
};
c2s_ports = {
};
c2s_interfaces = {
  "127.0.0.1";
  "::1";
};
s2s_ports = {
};
s2s_interfaces = {
  "127.0.0.1";
  "::1";
};
http_ports = {
  "52800";
};
http_interfaces = {
  "127.0.0.1";
  "::1";
};
https_ports = {
};
https_interfaces = {
  "127.0.0.1";
  "::1";
};
log = {
  info = "/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.log";
  error = "/var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.err";

};



VirtualHost "yoba.tv"
  authentication = "http";
  modules_enabled = {
  "ping";
  "auth_http";
  "http";
  "bosh";
};
  http_auth_url = "https://yoba.tv/plugins/livechat/3.2.0/router/api/user";
  trusted_proxies = {
  "127.0.0.1";
  "::1";
};
  allow_anonymous_s2s = false;
  http_host = "yoba.tv";
  http_external_url = "http://yoba.tv";


VirtualHost "anon.yoba.tv"
  authentication = "anonymous";
  modules_enabled = {
  "ping";
  "http";
  "bosh";
};
  trusted_proxies = {
  "127.0.0.1";
  "::1";
};
  allow_anonymous_s2s = false;
  http_host = "yoba.tv";
  http_external_url = "http://yoba.tv";


Component "room.yoba.tv" "muc"
  muc_room_locking = false;
  muc_tombstones = false;
  muc_room_default_language = "en";
  muc_room_default_public = false;
  muc_room_default_persistent = true;
  muc_room_default_members_only = false;
  muc_room_default_moderated = false;
  muc_room_default_public_jids = false;
  muc_room_default_change_subject = false;
  muc_room_default_history_length = 20;
  restrict_room_creation = false;
  http_host = "yoba.tv";
  http_external_url = "http://yoba.tv";
  modules_enabled = {
  "muc_http_defaults";
  "muc_mam";
  "muc_moderation";
  "http_peertubelivechat_list_rooms";
  "http_peertubelivechat_test";
};
  muc_create_api_url = {
  "https://yoba.tv/plugins/livechat/3.2.0/router/api/room?apikey=4vo0t7ttii&jid={room.jid|jid_node}";
};
  muc_log_by_default = true;
  muc_log_presences = true;
  log_all_rooms = true;
  muc_log_expires_after = "1w";
  muc_log_cleanup_interval = 14400;
  peertubelivechat_list_rooms_apikey = "4vo0t7ttii";
  peertubelivechat_test_apikey = "4vo0t7ttii";
  peertubelivechat_test_peertube_api_url = "https://yoba.tv/plugins/livechat/3.2.0/router/api/test?apikey=4vo0t7ttii";


Prosody version
Prosody 0.11.9

# Prosody directories
Data directory:     /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/data
Config directory:   /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody
Source directory:   /usr/lib/prosody
Plugin directories:
  /var/www/peertube/storage/plugins/node_modules/peertube-plugin-livechat/dist/server/prosody-modules
  /usr/lib/prosody/modules/
  

# Lua environment
Lua version:             	Lua 5.2

Lua module search paths:
  /usr/lib/prosody/?.lua
  /usr/local/share/lua/5.2/?.lua
  /usr/local/share/lua/5.2/?/init.lua
  /usr/local/lib/lua/5.2/?.lua
  /usr/local/lib/lua/5.2/?/init.lua
  /usr/share/lua/5.2/?.lua
  /usr/share/lua/5.2/?/init.lua

Lua C module search paths:
  /usr/lib/prosody/?.so
  /usr/local/lib/lua/5.2/?.so
  /usr/lib/x86_64-linux-gnu/lua/5.2/?.so
  /usr/lib/lua/5.2/?.so
  /usr/local/lib/lua/5.2/loadall.so

LuaRocks:        	Not installed

# Network

Backend: select

# Lua module versions
lfs:     	LuaFileSystem 1.6.3
lxp:     	LuaExpat 1.3.0
socket:  	LuaSocket 3.0-rc1
ssl:     	0.6

Any help would be appreciated! Also I'm running Ubuntu 18 . Thanks!

Option to use room linked to the channel

Is your feature request related to a problem? Please describe.
I'm actually trying to provide a chat overlay for OBS Studio, it actually use Matterbridge API as message provider.
Matterbridge can also unify different chat solution as one for the overlay enabling a nice double-stream chat overlay.
The issue is that only PeerTube require to change the room in the config for each live on the same channel. And restarting Matterbridge if someone else is using the solution is not a good idea.
Using permanent live which unfortunately use live slot even if not streaming, so it's not a solution.

Describe the solution you'd like
So I thought, what about creating a room related to the channel and make channel's live able to use it when needed.
It will add an option when creating a video to use a room related to the channel rather than the video.
So any live from the same channel with this option enabled will provide the same room.

It could also enable the possibility to recover the room, if a crash happen on a non-permanent live.
Note: There is no need to keep the room alive all the time.

Describe alternatives you've considered
Like I said changing the config manually on the server each time is not convenient and worse if someone is already streaming and using the solution.

Additional context
I tried to implement it myself but I'm beginner at JS/TS but I don't think I'd be able to make it.
If you want I can push my draft of the attempt in my repo.

Cannot re-install plugin after uninstalled it

To Reproduce
Steps to reproduce the behavior:

  1. Install the plugin
  2. Set the xmpp server as prosody
  3. Uninstall the plugin
  4. See error
error[9/14/2021, 2:12:47 PM] Cannot install plugin peertube-plugin-livechat, removing it...

{
  "err": {
    "stack": "Error: spawn prosodyctl ENOENT\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)\n    at onErrorNT (internal/child_process.js:470:16)\n    at processTicksAndRejections (internal/process/task_queues.js:84:21)",
    "message": "spawn prosodyctl ENOENT",
    "errno": "ENOENT",
    "code": "ENOENT",
    "syscall": "spawn prosodyctl",
    "path": "prosodyctl",
    "spawnargs": [
      "--config",
      "/data/plugins/data/peertube-plugin-livechat/prosody/prosody.cfg.lua",
      "status"
    ]
  }
}

warn[9/14/2021, 2:12:47 PM] Cannot unregister plugin peertube-plugin-livechat.

{
  "err": {
    "stack": "Error: Unknown plugin peertube-plugin-livechat to unregister\n    at PluginManager.<anonymous> (/app/dist/server/lib/plugins/plugin-manager.js:181:23)\n    at Generator.next (<anonymous>)\n    at /app/node_modules/tslib/tslib.js:117:75\n    at new Promise (<anonymous>)\n    at Object.__awaiter (/app/node_modules/tslib/tslib.js:113:16)\n    at PluginManager.unregister (/app/dist/server/lib/plugins/plugin-manager.js:177:24)\n    at PluginManager.<anonymous> (/app/dist/server/lib/plugins/plugin-manager.js:261:28)\n    at Generator.next (<anonymous>)\n    at /app/node_modules/tslib/tslib.js:117:75\n    at new Promise (<anonymous>)\n    at Object.__awaiter (/app/node_modules/tslib/tslib.js:113:16)\n    at PluginManager.uninstall (/app/dist/server/lib/plugins/plugin-manager.js:258:24)\n    at PluginManager.<anonymous> (/app/dist/server/lib/plugins/plugin-manager.js:228:32)\n    at Generator.throw (<anonymous>)\n    at rejected (/app/node_modules/tslib/tslib.js:115:69)\n    at runMicrotasks (<anonymous>)\n    at processTicksAndRejections (internal/process/task_queues.js:97:5)",
    "message": "Unknown plugin peertube-plugin-livechat to unregister"
  }
}

Server (please complete the following information):

  • Peertube version: v3.3.0
  • Peertube installation type: docker
  • peertube-plugin-livechat version: 4.0.0

Missing files

Not sure what i did wrong, but some files seem to be missing and can not find them on your repository:
image
I wanted to use build in UI. Can you please advice ?

Anonymous login problem

I don’t want to wait for instructions.
I still managed to install and configure the Prosody server. If you use authorization by default, then everything works fine, you can check it yourself ...
conference.chat.peervideo.ru

User: test
Password: 12345678

BOSH also works https://chat.peervideo.ru:5281/http-bind/

If you try your configuration, then the connection to the server does not work ... When connecting, error
"The server does not use any language of the used authentication method"

But if I comment out these two lines then everything works well

--      authentication = "anonymous"
--      allow_anonymous_s2s = false

Chat per video

Describe the solution you'd like
The chat should be activated per video.

To not break existing installations, it should be a new settings «per video activation».

Can't disable builtin ConverseJS

Describe the bug
Disabling "Use builtin ConverseJS" in plugin settings doesn't disable the setting.

To Reproduce
Steps to reproduce the behavior:

  1. Go to plugin settings
  2. Uncheck "Use builtin ConverseJS"
  3. Save
  4. Refresh

Expected behavior
The setting should remain disabled

Desktop (please complete the following information):

  • OS: Linux, Pop!_OS 20.10
  • Browser: Brave
  • Version: 1.21.73

Additional context
chat-use-builtin in the database is false, but is somehow still returning true to the UI. This prevents chat-uri from being utilized in the iframe.

Chat problem

Hello. I saw an update for your plugin and decided to try to install it, but after installation (as written in the instructions), the chat did not work for me.
I am using an external chat server that is powered by Rocket Chat. It is of course very convenient, but I lack the knowledge to fully integrate it with video IDs and Peertube accounts.

I videotaped the entire plugin installation process. Tell me what I did wrong?

https://peervideo.ru/videos/watch/6d7ff5e5-f9f7-49b4-8633-255edd90bb6b

Global and local terms&conditions for chat

There should be some legal information in the Peertube's About page for the webchat.

This message could also be displayed when you first open the chat, before you can chat (this would require a settings to enable).

We could also add a settings for each streamer, so that they can add their own terms for their rooms, that overrides the global one.

  • Add a panel to setup terms&conditions
  • Display terms&condition on the instance about page
  • Display terms&condition on top of the chat

Reference: NlNet-task-31

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.