add: clear online status on server boot

This commit is contained in:
Holger Huo 2025-01-08 18:42:46 +08:00 committed by strawberry
parent 8451ea3bc3
commit b71201cf19
2 changed files with 43 additions and 0 deletions

View file

@ -123,6 +123,11 @@ impl Services {
.start()
.await?;
// clear online statuses
if self.server.config.allow_local_presence {
_ = self.presence.unset_all_presence().await;
}
// set the server user as online
if self.server.config.allow_local_presence && !self.db.is_read_only() {
_ = self