feat: support group invite privacy verification

This commit is contained in:
richjohnrambo
2026-09-12 11:20:48 +08:00
parent 80c802af20
commit ca3957e3b3
12 changed files with 197 additions and 63 deletions
@@ -0,0 +1,17 @@
-- Add personal privacy switch for requiring approval when others invite the user into a group.
-- Default is off to preserve existing behavior.
SET @im_sql = (
SELECT IF(
COUNT(*) = 0,
'ALTER TABLE tinode.im_user_privacy_settings ADD COLUMN group_invite_verification TINYINT NOT NULL DEFAULT 0 AFTER read_receipts',
'SELECT 1'
)
FROM information_schema.columns
WHERE table_schema = 'tinode'
AND table_name = 'im_user_privacy_settings'
AND column_name = 'group_invite_verification'
);
PREPARE im_stmt FROM @im_sql;
EXECUTE im_stmt;
DEALLOCATE PREPARE im_stmt;