Skip to content
Snippets Groups Projects
Commit 05d25dc6 authored by Bob Mottram's avatar Bob Mottram
Browse files

Add notification account as an xmpp admin

parent d9d3563b
No related branches found
No related tags found
No related merge requests found
......@@ -781,7 +781,6 @@ function xmpp_modules {
echo ' "http";';
echo ' "http_upload";';
echo ' "websocket";';
echo ' "post_msg";';
echo ' "throttle_presence"; -- Reduce battery and bandwidth usage';
echo ' "filter_chatstates"; -- Reduce battery and bandwidth usage';
echo '};'; } >> "$filename"
......@@ -834,7 +833,7 @@ function xmpp_onion_addresses {
}
function xmpp_create_config {
echo "admins = { \"$MY_USERNAME@$DEFAULT_DOMAIN_NAME\" }" > /etc/prosody/prosody.cfg.lua
echo "admins = { \"$MY_USERNAME@$DEFAULT_DOMAIN_NAME\", \"notification@$DEFAULT_DOMAIN_NAME\" }" > /etc/prosody/prosody.cfg.lua
echo 'plugin_paths = { "/var/lib/prosody/prosody-modules" }' >> /etc/prosody/prosody.cfg.lua
echo '' >> /etc/prosody/prosody.cfg.lua
xmpp_modules /etc/prosody/prosody.cfg.lua
......
......@@ -89,7 +89,7 @@ if [ -d /etc/prosody ]; then
echo 'tojid = sys.argv[1]';
echo 'data = sys.stdin.readlines()';
echo "msg = ' '.join(data)";
echo "username = 'notification@$HOSTNAME'";
echo "username = 'notification@$HOSTNAME/announce/online'";
echo "password = '$notification_user_password'";
echo 'jid=xmpp.protocol.JID(username)';
echo 'cl=xmpp.Client(jid.getDomain(),debug=[])';
......@@ -100,7 +100,7 @@ if [ -d /etc/prosody ]; then
echo 'if not auth:';
echo ' sys.exit()';
echo 'id=cl.send(xmpp.protocol.Message(tojid, msg))';
echo 'time.sleep(2)';
echo 'time.sleep(1)';
echo 'cl.disconnect()'; } > /tmp/xsend
chmod +x /tmp/xsend
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment