diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py
index 24f8c1bc8312454c62aaf279d7a73a4b795ff785..7195de98b52b4cfdae5cbdc48c76fd4009987444 100644
--- a/synapse/handlers/message.py
+++ b/synapse/handlers/message.py
@@ -263,7 +263,7 @@ class MessageHandler(BaseHandler):
             }
 
             if event.membership == Membership.INVITE:
-                d["inviter"] = event.user_id
+                d["inviter"] = event.sender
 
             rooms_ret.append(d)