Remove the default value for device_id

nio doesn't need a device_id unless E2EE is used, so the correct behaviour should be to default it to `None` and, if it's missing, warn the user of what might happen.
This commit is contained in:
Brendan Abolivier 2019-11-07 13:32:35 +00:00 committed by GitHub
parent 25da0a8f12
commit 2ea2448585
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -60,7 +60,12 @@ class Config(object):
if not self.access_token:
raise ConfigError("matrix.access_token is a required field")
self.device_id = matrix.get("device_id", "cribbage bot")
self.device_id = matrix.get("device_id")
if not self.device_id:
logger.warning(
"matrix.device_id is not provided, which means that end-to-end
" encryption won't work correctly"
)
self.homeserver_url = matrix.get("homeserver_url")
if not self.homeserver_url: