增加私聊置顶和按设备统计未读

This commit is contained in:
xhgit committed 2026-11-15 22:35:45 +08:00
1 parent 7e165ba9b4
commit ec2679b991
19 files changed
+312 -52

No files matched your search

+3 -1
View File
@@ -78,7 +78,9 @@ func (a *API) changeContact(w http.ResponseWriter, r *http.Request, _ string, id
}
pipe := a.redis.Pipeline()
pipe.Publish(r.Context(), "xhchat:contacts:"+identity.User.ID, "changed")
if input.Action != "preferences" && input.Action != "mute" && input.Action != "unmute" {
switch input.Action {
case "preferences", "mute", "unmute", "pin", "unpin":
default:
pipe.Publish(r.Context(), "xhchat:contacts:"+strings.ToLower(target), "changed")
}
_, _ = pipe.Exec(r.Context())