buffer: Always add users with a higher power level.
This commit is contained in:
parent
4ebcfe59a2
commit
701085f8ff
1 changed files with 10 additions and 1 deletions
|
@ -879,6 +879,15 @@ class RoomBuffer(object):
|
||||||
# going to add nicks later in a timer hook.
|
# going to add nicks later in a timer hook.
|
||||||
if (len(self.displayed_nicks) > 100
|
if (len(self.displayed_nicks) > 100
|
||||||
and is_state):
|
and is_state):
|
||||||
|
# Always add users with a high power level
|
||||||
|
try:
|
||||||
|
user = self.room.users[event.state_key]
|
||||||
|
except KeyError:
|
||||||
|
self.unhandled_users.append(event.state_key)
|
||||||
|
else:
|
||||||
|
if user.power_level > 0:
|
||||||
|
self.add_user(event.state_key, date, is_state)
|
||||||
|
else:
|
||||||
self.unhandled_users.append(event.state_key)
|
self.unhandled_users.append(event.state_key)
|
||||||
else:
|
else:
|
||||||
self.add_user(event.state_key, date, is_state)
|
self.add_user(event.state_key, date, is_state)
|
||||||
|
|
Loading…
Add table
Reference in a new issue