diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index aa950a7..bb6a930 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,9 +4,9 @@
-
+
-
+
@@ -152,7 +152,6 @@
-
@@ -177,7 +176,8 @@
-
+
+
true
diff --git a/pkg/internal/services/statuses.go b/pkg/internal/services/statuses.go
index 41387df..f1c07ac 100644
--- a/pkg/internal/services/statuses.go
+++ b/pkg/internal/services/statuses.go
@@ -49,8 +49,10 @@ func GetStatusOnline(uid uint) error {
return nil
} else if err == nil && status.IsInvisible {
return fmt.Errorf("invisible")
- } else {
+ } else if !isOnline {
return fmt.Errorf("offline")
+ } else {
+ return nil
}
}
@@ -78,6 +80,8 @@ func ClearStatus(user models.Account) error {
Where("clear_at < ?", time.Now()).
Updates(models.Status{ClearAt: lo.ToPtr(time.Now())}).Error; err != nil {
return err
+ } else {
+ delete(statusCache, user.ID)
}
return nil