feat: Make the same domain policy configurable
This commit is contained in:
1 parent
c40390dd5c
commit
50983cae44
2 files changed
+3
-2
No files matched your search
+2
-2
@@ -135,8 +135,7 @@ class WarningBot:
|
||||
if not msg.body:
|
||||
return False
|
||||
|
||||
# TODO: Make this configurable
|
||||
if msg.from_.domain != self._jid.domain:
|
||||
if msg.from_.domain != self._jid.domain and self._same_domain:
|
||||
return False
|
||||
|
||||
return True
|
||||
@@ -317,6 +316,7 @@ class WarningBot:
|
||||
self._data_dir = config['General'].get('DataDir', '/etc/janine')
|
||||
self._recipients = config['General']['Recipients'].split(',')
|
||||
self._refresh_timeout = int(config['General']['Timeout'])
|
||||
self._same_domain = config['General'].get('SameDomain', 'True') == 'True'
|
||||
|
||||
# Persistent data
|
||||
# Subscribed clients
|
||||
|
||||
Reference in new issue
Block a user