docs: update im integration and schema notes

This commit is contained in:
richjohnrambo
2026-09-17 14:59:28 +08:00
parent 50f8581667
commit ed976c76ff
5 changed files with 150 additions and 45 deletions
@@ -0,0 +1,37 @@
-- Add personal privacy switch for requiring approval when others add the user as a friend.
-- Default is on to preserve the current "friend request needs approval" behavior.
-- Run this for every tenant business database. The current test environment uses:
-- default -> tinode
-- system -> meeting_im
SET @im_schema = 'tinode';
SET @im_sql = (
SELECT IF(
COUNT(*) = 0,
CONCAT('ALTER TABLE ', @im_schema, '.im_user_privacy_settings ADD COLUMN friend_request_verification TINYINT NOT NULL DEFAULT 1 AFTER read_receipts'),
'SELECT 1'
)
FROM information_schema.columns
WHERE table_schema = @im_schema
AND table_name = 'im_user_privacy_settings'
AND column_name = 'friend_request_verification'
);
PREPARE im_stmt FROM @im_sql;
EXECUTE im_stmt;
DEALLOCATE PREPARE im_stmt;
SET @im_schema = 'meeting_im';
SET @im_sql = (
SELECT IF(
COUNT(*) = 0,
CONCAT('ALTER TABLE ', @im_schema, '.im_user_privacy_settings ADD COLUMN friend_request_verification TINYINT NOT NULL DEFAULT 1 AFTER read_receipts'),
'SELECT 1'
)
FROM information_schema.columns
WHERE table_schema = @im_schema
AND table_name = 'im_user_privacy_settings'
AND column_name = 'friend_request_verification'
);
PREPARE im_stmt FROM @im_sql;
EXECUTE im_stmt;
DEALLOCATE PREPARE im_stmt;