Show invisible is enabled in api

This commit is contained in:
LittleSheep 2024-07-20 15:14:50 +08:00
parent b3bb7cb582
commit 6643d31b1a

View File

@ -2,13 +2,14 @@ package api
import (
"fmt"
"time"
"git.solsynth.dev/hydrogen/passport/pkg/internal/database"
"git.solsynth.dev/hydrogen/passport/pkg/internal/models"
"git.solsynth.dev/hydrogen/passport/pkg/internal/server/exts"
"git.solsynth.dev/hydrogen/passport/pkg/internal/services"
"github.com/gofiber/fiber/v2"
"github.com/samber/lo"
"time"
)
func getStatus(c *fiber.Ctx) error {
@ -25,9 +26,6 @@ func getStatus(c *fiber.Ctx) error {
disturbable := services.GetStatusDisturbable(user.ID) == nil
online := services.GetStatusOnline(user.ID) == nil
// Always set false to hide from others
status.IsInvisible = false
return c.JSON(fiber.Map{
"status": lo.Ternary(err == nil, &status, nil),
"last_seen_at": user.Profile.LastSeenAt,