buffer: Add a localvar containing the room domain.

This commit is contained in:
Damir Jelić 2018-11-06 13:59:03 +01:00
parent 59b318bdce
commit 3f3c5f9fba

View file

@ -820,10 +820,21 @@ class RoomBuffer(object):
# displayed in the buffer
self.displayed_nicks = {}
user = shorten_sender(self.room.own_user_id)
self.weechat_buffer = WeechatChannelBuffer(
buffer_name, server_name, user
)
try:
_, room_domain = room.room_id.split(":", 1)
W.buffer_set(
self.weechat_buffer._ptr,
"localvar_set_domain",
room_domain
)
except ValueError:
pass
@property
def backlog_pending(self):
return self._backlog_pending