core: member support chat stats (#5803)

* core: member support chat stats

* schema

* update counts

* mark read wip

* dec counts on read

* rename

* plans

* test, fixes

* plans

* refactor

* rename

---------

Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
This commit is contained in:
spaced4ndy
2025-04-05 11:25:45 +00:00
committed by GitHub
parent c12817ac81
commit d85ac4af04
15 changed files with 475 additions and 216 deletions

View File

@@ -134,9 +134,7 @@ CREATE TABLE groups(
business_xcontact_id BLOB NULL,
customer_member_id BLOB NULL,
chat_item_ttl INTEGER,
local_alias TEXT DEFAULT '',
mods_support_chat_ts TEXT,
mods_support_chat_unanswered INTEGER, -- received
local_alias TEXT DEFAULT '', -- received
FOREIGN KEY(user_id, local_display_name)
REFERENCES display_names(user_id, local_display_name)
ON DELETE CASCADE
@@ -170,7 +168,9 @@ CREATE TABLE group_members(
peer_chat_max_version INTEGER NOT NULL DEFAULT 1,
member_restriction TEXT,
support_chat_ts TEXT,
support_chat_unanswered INTEGER,
support_chat_items_unread INTEGER NOT NULL DEFAULT 0,
support_chat_items_member_attention INTEGER NOT NULL DEFAULT 0,
support_chat_items_mentions INTEGER NOT NULL DEFAULT 0,
FOREIGN KEY(user_id, local_display_name)
REFERENCES display_names(user_id, local_display_name)
ON DELETE CASCADE