@@ -1193,22 +1193,25 @@ def _update_users_data_from_initial_data(self) -> None:
1193
1193
* UserStatus, an arbitrary one is chosen.
1194
1194
"""
1195
1195
aggregate_status : UserStatus = "offline"
1196
+ server_aggregate_status = "offline"
1196
1197
for client_name , client_presence in presences [email ].items ():
1197
1198
status = client_presence ["status" ]
1198
1199
timestamp = client_presence ["timestamp" ]
1199
- if client_name == "aggregated" :
1200
- continue
1201
1200
if (server_timestamp - timestamp ) < OFFLINE_THRESHOLD_SECS :
1202
- if status == "active" :
1203
- aggregate_status = "active"
1204
- if status == "idle" and aggregate_status != "active" :
1205
- aggregate_status = status
1206
- if status == "offline" and (
1207
- aggregate_status != "active" and aggregate_status != "idle"
1208
- ):
1209
- aggregate_status = status
1210
-
1211
- status = aggregate_status
1201
+ if client_name == "aggregated" :
1202
+ server_aggregate_status = status
1203
+ else :
1204
+ if status == "active" :
1205
+ aggregate_status = "active"
1206
+ if status == "idle" and aggregate_status != "active" :
1207
+ aggregate_status = status
1208
+ if status == "offline" and (
1209
+ aggregate_status != "active"
1210
+ and aggregate_status != "idle"
1211
+ ):
1212
+ aggregate_status = status
1213
+
1214
+ status = server_aggregate_status
1212
1215
else :
1213
1216
# Set status of users not in the `presence` list
1214
1217
# as 'inactive'. They will not be displayed in the
0 commit comments