Fix and refactor room and user stats (#5971)

Previously the stats were not being correctly populated.
This commit is contained in:
Erik Johnston 2019-09-04 13:04:27 +01:00 committed by GitHub
parent ea128a3e8e
commit 6e834e94fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 1640 additions and 639 deletions

View file

@ -128,8 +128,12 @@ class RestHelper(object):
return channel.json_body
def send_state(self, room_id, event_type, body, tok, expect_code=200):
path = "/_matrix/client/r0/rooms/%s/state/%s" % (room_id, event_type)
def send_state(self, room_id, event_type, body, tok, expect_code=200, state_key=""):
path = "/_matrix/client/r0/rooms/%s/state/%s/%s" % (
room_id,
event_type,
state_key,
)
if tok:
path = path + "?access_token=%s" % tok