Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
2ec08947
Commit
2ec08947
authored
6 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-app-xmpp
+8
-14
8 additions, 14 deletions
src/freedombone-app-xmpp
with
8 additions
and
14 deletions
src/freedombone-app-xmpp
+
8
−
14
View file @
2ec08947
...
@@ -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;'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment