refactor: clients now have a single websocket that handles all rooms the user is in
This commit is contained in:
@@ -57,7 +57,6 @@ CREATE TABLE IF NOT EXISTS message_ (
|
||||
|
||||
CREATE TABLE ws_token_ (
|
||||
token TEXT PRIMARY KEY,
|
||||
room_id INT NOT NULL,
|
||||
expires_at TIMESTAMPTZ NOT NULL
|
||||
);
|
||||
|
||||
|
||||
@@ -29,9 +29,9 @@ INSERT INTO friendship_ (user_first, user_second) VALUES
|
||||
INSERT INTO friend_request_ (sender, receiver) VALUES
|
||||
(2, 1); -- Bob sent a friend request to Alice
|
||||
|
||||
INSERT INTO ws_token_ (token, room_id, expires_at) VALUES
|
||||
('random_token_1', 1, '2025-12-31T23:59:59Z'),
|
||||
('random_token_2', 2, '2025-12-31T23:59:59Z');
|
||||
INSERT INTO ws_token_ (token, expires_at) VALUES
|
||||
('random_token_1', '2025-12-31T23:59:59Z'),
|
||||
('random_token_2', '2025-12-31T23:59:59Z');
|
||||
|
||||
INSERT INTO room_invite_ (sender, receiver, room) VALUES
|
||||
(2, 1, 2);
|
||||
|
||||
Reference in New Issue
Block a user