refactor: 重構 對話 成員的儲存邏輯
* 使用關聯資料庫, 鏈接 user_id 和 chat_id
This commit is contained in:
@@ -13,7 +13,7 @@ export default class ChatPrivate extends Chat {
|
||||
|
||||
static createForPrivate(userA: User, userB: User) {
|
||||
const chat = this.create(this.getChatIdByUsersId(userA.bean.id, userB.bean.id), 'private')
|
||||
chat.setMembers([
|
||||
chat.addMembers([
|
||||
userA.bean.id,
|
||||
userB.bean.id
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user