summary refs log tree commit diff
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-07-08 17:14:51 +0100
committerGitHub <noreply@github.com>2019-07-08 17:14:51 +0100
commitb70e080b59c992197e02c6278984a96706fc6b7f (patch)
treecedb93eda416f3a3127e8bc18ede2b8a005919f9
parentUpdate ModuleApi to avoid register(generate_token=True) (#5640) (diff)
downloadsynapse-b70e080b59c992197e02c6278984a96706fc6b7f.tar.xz
Better logging for auto-join. (#5643)
It was pretty unclear what was going on, so I've added a couple of log lines.
-rw-r--r--changelog.d/5643.misc1
-rw-r--r--synapse/handlers/register.py7
2 files changed, 8 insertions, 0 deletions
diff --git a/changelog.d/5643.misc b/changelog.d/5643.misc
new file mode 100644
index 0000000000..2b2316469e
--- /dev/null
+++ b/changelog.d/5643.misc
@@ -0,0 +1 @@
+Improve logging for auto-join when a new user is created.
diff --git a/synapse/handlers/register.py b/synapse/handlers/register.py
index 853020180b..c72735067f 100644
--- a/synapse/handlers/register.py
+++ b/synapse/handlers/register.py
@@ -256,8 +256,14 @@ class RegistrationHandler(BaseHandler):
                     user_id = None
                     token = None
                     attempts += 1
+
         if not self.hs.config.user_consent_at_registration:
             yield self._auto_join_rooms(user_id)
+        else:
+            logger.info(
+                "Skipping auto-join for %s because consent is required at registration",
+                user_id,
+            )
 
         # Bind any specified emails to this account
         current_time = self.hs.get_clock().time_msec()
@@ -298,6 +304,7 @@ class RegistrationHandler(BaseHandler):
             count = yield self.store.count_all_users()
             should_auto_create_rooms = count == 1
         for r in self.hs.config.auto_join_rooms:
+            logger.info("Auto-joining %s to %s", user_id, r)
             try:
                 if should_auto_create_rooms:
                     room_alias = RoomAlias.from_string(r)