feat: Make the same domain policy configurable
This commit is contained in:
@@ -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