[021] XenForo WebSockets

xF2 Add-on [021] XenForo WebSockets 2.0.0

No permission to download
The getWebsocketsPromise method has been introduced, which allows you to execute code after the XF.Echo and XF.EchoManager objects are ready to work. This method should improve the stability of add-ons based on XenForo WebSockets.

Support for the Keep Alive XenForo system that updates the CSRF token when a tab is restored in browsers on mobile devices. This will get rid of such errors: Cookie Required To Use This Site, Security Error.
Note: After this update, you need to grant permission to use WebSockets to user groups who should have this permission.

Added permission to use WebSockets.
Permissions.png
Prevented error output on the user side in case of problems with the websocket server
Removed check for installed soketi on the server when installing daemons
Added /bin/bash prefix to avoid "Executable path is not absolute, ignoring" error
Updated config for supervisorctl in setup helper script to properly stop soketi server processes.

For those who have already configured the soketi service on supervisorctl, it is recommended to do the following:
  • Stop soketi service supervisorctl stop soketi.your_domain.com
  • Kill all soketi server process: pkill -f soketi
  • Add the following content to the service config (usually located in one of the folders: /etc/supervisor/conf.d, /etc/supervisor.d, /usr/local/etc/supervisor.d):
Code:
stopasgroup=true
killasgroup=true
numprocs=1
redirect_stderr=true
stopwaitsecs=60
stopsignal=sigint
minfds=10240

  • Reload supervisor: supervisorctl reload
  • The service should start automatically.
Fixed issues with Pusher API