File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -975,6 +975,15 @@ def get_all_users(self) -> List[Dict[str, Any]]:
975
975
"user_id" : user ["user_id" ],
976
976
"status" : status ,
977
977
}
978
+
979
+ if user ["is_bot" ]:
980
+ self .user_dict [user ["email" ]] = {
981
+ "full_name" : user ["full_name" ],
982
+ "email" : email ,
983
+ "user_id" : user ["user_id" ],
984
+ "status" : "bot" ,
985
+ }
986
+
978
987
self ._all_users_by_id [user ["user_id" ]] = user
979
988
self .user_id_email_dict [user ["user_id" ]] = email
980
989
@@ -985,7 +994,7 @@ def get_all_users(self) -> List[Dict[str, Any]]:
985
994
"full_name" : bot ["full_name" ],
986
995
"email" : email ,
987
996
"user_id" : bot ["user_id" ],
988
- "status" : "inactive" ,
997
+ "status" : "bot" , #FIXME was inactive, does this work?
989
998
}
990
999
self ._cross_realm_bots_by_id [bot ["user_id" ]] = bot
991
1000
self ._all_users_by_id [bot ["user_id" ]] = bot
@@ -1010,7 +1019,7 @@ def get_all_users(self) -> List[Dict[str, Any]]:
1010
1019
inactive = [
1011
1020
properties
1012
1021
for properties in self .user_dict .values ()
1013
- if properties ["status" ] == "inactive"
1022
+ if properties ["status" ] == "inactive" or properties [ "status" ] == "bot"
1014
1023
]
1015
1024
1016
1025
# Construct user_list from sorted components of each list
You can’t perform that action at this time.
0 commit comments