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

Remove broadcast settings from xmpp

They prevent notifications from happening
parent b2d1de4d
No related branches found
No related tags found
No related merge requests found
...@@ -516,7 +516,6 @@ function update_prosody_modules { ...@@ -516,7 +516,6 @@ function update_prosody_modules {
sed -i 's|"s2s_blacklist";| "s2s_blacklist";|g' /etc/prosody/prosody.cfg.lua sed -i 's|"s2s_blacklist";| "s2s_blacklist";|g' /etc/prosody/prosody.cfg.lua
fi fi
xmpp_broadcast /etc/prosody/prosody.cfg.lua
xmpp_server_blacklist /etc/prosody/prosody.cfg.lua xmpp_server_blacklist /etc/prosody/prosody.cfg.lua
sed -i '/"mam_muc";/d' /etc/prosody/prosody.cfg.lua sed -i '/"mam_muc";/d' /etc/prosody/prosody.cfg.lua
...@@ -608,9 +607,16 @@ function upgrade_xmpp { ...@@ -608,9 +607,16 @@ function upgrade_xmpp {
update_prosody_modules update_prosody_modules
xmpp_onion_addresses /etc/prosody/prosody.cfg.lua xmpp_onion_addresses /etc/prosody/prosody.cfg.lua
xmpp_contact_info /etc/prosody/prosody.cfg.lua xmpp_contact_info /etc/prosody/prosody.cfg.lua
xmpp_broadcast /etc/prosody/prosody.cfg.lua
xmpp_server_blacklist /etc/prosody/prosody.cfg.lua xmpp_server_blacklist /etc/prosody/prosody.cfg.lua
# remove any broadcast settings
if grep -q '"broadcast"' /etc/prosody/prosody.cfg.lua; then
sed -i '/broadcast/d' /etc/prosody/prosody.cfg.lua
fi
if grep -q '"broadcast"' /etc/prosody/conf.avail/xmpp.cfg.lua; then
sed -i '/broadcast/d' /etc/prosody/conf.avail/xmpp.cfg.lua
fi
if grep -q "/etc/ssl/certs/xmpp.dhparam" /etc/prosody/prosody.cfg.lua; then if grep -q "/etc/ssl/certs/xmpp.dhparam" /etc/prosody/prosody.cfg.lua; then
cp /etc/ssl/certs/xmpp.dhparam /etc/prosody/xmpp.dhparam cp /etc/ssl/certs/xmpp.dhparam /etc/prosody/xmpp.dhparam
chown prosody:prosody /etc/prosody/xmpp.dhparam chown prosody:prosody /etc/prosody/xmpp.dhparam
...@@ -898,7 +904,6 @@ function xmpp_modules { ...@@ -898,7 +904,6 @@ function xmpp_modules {
echo ' "http";'; echo ' "http";';
echo ' "http_upload";'; echo ' "http_upload";';
echo ' "websocket";'; echo ' "websocket";';
echo ' "broadcast";';
echo ' "throttle_presence"; -- Reduce battery and bandwidth usage'; echo ' "throttle_presence"; -- Reduce battery and bandwidth usage';
echo ' "filter_chatstates"; -- Reduce battery and bandwidth usage'; echo ' "filter_chatstates"; -- Reduce battery and bandwidth usage';
echo '};'; } >> "$filename" echo '};'; } >> "$filename"
...@@ -950,16 +955,6 @@ function xmpp_onion_addresses { ...@@ -950,16 +955,6 @@ function xmpp_onion_addresses {
echo '};'; } >> "$filename" echo '};'; } >> "$filename"
} }
function xmpp_broadcast {
filename="$1"
if ! grep -q "broadcast_senders =" "$filename"; then
echo "broadcast_senders = { \"notification@$HOSTNAME\" }" >> "$filename"
else
sed -i "s|broadcast_senders =.*|broadcast_senders = { \"notification@$HOSTNAME\" }|g" "$filename"
fi
}
function xmpp_server_blacklist { function xmpp_server_blacklist {
filename="$1" filename="$1"
...@@ -992,7 +987,6 @@ function xmpp_create_config { ...@@ -992,7 +987,6 @@ function xmpp_create_config {
echo '' >> /etc/prosody/prosody.cfg.lua echo '' >> /etc/prosody/prosody.cfg.lua
xmpp_onion_addresses /etc/prosody/prosody.cfg.lua xmpp_onion_addresses /etc/prosody/prosody.cfg.lua
xmpp_contact_info /etc/prosody/prosody.cfg.lua xmpp_contact_info /etc/prosody/prosody.cfg.lua
xmpp_broadcast /etc/prosody/prosody.cfg.lua
xmpp_server_blacklist /etc/prosody/prosody.cfg.lua xmpp_server_blacklist /etc/prosody/prosody.cfg.lua
{ echo ''; { echo '';
echo 'allow_registration = false;'; echo 'allow_registration = false;';
......
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