fix: 添加了新的字段代替 chat id
* 谁又能想到 chat id 的可变性和依赖性恰恰埋下了祸患呢
This commit is contained in:
@@ -317,7 +317,7 @@ export default class UserApi extends BaseApi {
|
||||
}
|
||||
|
||||
const user = User.findById(token.author) as User
|
||||
const chat = Chat.findById(args.target as string)
|
||||
const chat = Chat.findById(args.target as string) || Chat.findByName(args.target as string)
|
||||
const targetUser = User.findByAccount(args.target as string) as User
|
||||
if (chat)
|
||||
user!.addContact(chat.bean.id)
|
||||
|
||||
Reference in New Issue
Block a user