Skip to content

Commit c0a29a7

Browse files
committed
model: Added bot to end of user list.
1 parent 1e036de commit c0a29a7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

zulipterminal/model.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1021,12 +1021,18 @@ def get_all_users(self) -> List[Dict[str, Any]]:
10211021
for properties in self.user_dict.values()
10221022
if properties["status"] == "inactive"
10231023
]
1024+
bot = [
1025+
properties
1026+
for properties in self.user_dict.values()
1027+
if properties["status"] == "bot"
1028+
]
10241029

10251030
# Construct user_list from sorted components of each list
10261031
user_list = sorted(active, key=lambda u: u["full_name"].casefold())
10271032
user_list += sorted(idle, key=lambda u: u["full_name"].casefold())
10281033
user_list += sorted(offline, key=lambda u: u["full_name"].casefold())
10291034
user_list += sorted(inactive, key=lambda u: u["full_name"].casefold())
1035+
user_list += sorted(bot, key=lambda u: u["full_name"].casefold())
10301036
# Add current user to the top of the list
10311037
user_list.insert(0, current_user)
10321038
self.user_dict[current_user["email"]] = current_user

0 commit comments

Comments
 (0)