From 4c04f6319b9e665e168417be92b5e9657b581c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 2 Jul 2019 18:10:12 +0200 Subject: [PATCH] buffer: Store the homeserver inside room buffers. --- matrix/buffer.py | 3 ++- matrix/server.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/matrix/buffer.py b/matrix/buffer.py index 68a39d5..188326a 100644 --- a/matrix/buffer.py +++ b/matrix/buffer.py @@ -849,8 +849,9 @@ class WeechatChannelBuffer(object): class RoomBuffer(object): - def __init__(self, room, server_name, prev_batch): + def __init__(self, room, server_name, homeserver, prev_batch): self.room = room + self.homeserver = homeserver self._backlog_pending = False self.prev_batch = prev_batch self.joined = True diff --git a/matrix/server.py b/matrix/server.py index 568fc5c..93b1568 100644 --- a/matrix/server.py +++ b/matrix/server.py @@ -1628,7 +1628,7 @@ class MatrixServer(object): def create_room_buffer(self, room_id, prev_batch): room = self.client.rooms[room_id] - buf = RoomBuffer(room, self.name, prev_batch) + buf = RoomBuffer(room, self.name, self.homeserver, prev_batch) if room.members_synced: buf.members_fetched = True