events: Pass a realm object into send_event.

This is a preparator refactor for supporting hosting different Tornado
processes on different servers; to look up which Tornado server we
should be sending the event to, we'll need the realm object.
This commit is contained in:
Tim Abbott
2018-11-02 15:33:54 -07:00
parent 75e48459b5
commit ea1ec68899
9 changed files with 119 additions and 99 deletions

View File

@@ -283,7 +283,7 @@ def do_set_realm_name(realm, name):
property='name',
value=name,
)
send_event(event, active_user_ids(realm))
send_event(realm, event, active_user_ids(realm))
```
`realm.save()` actually saves the changes to the realm to the