用户可以在不成为成员的情况下查看对话详情
This commit is contained in:
@@ -40,10 +40,6 @@ export default class ChatApi extends BaseApi {
|
|||||||
code: 404,
|
code: 404,
|
||||||
msg: "对话不存在",
|
msg: "对话不存在",
|
||||||
}
|
}
|
||||||
if (!UserChatLinker.checkUserIsLinkedToChat(token.author, chat!.bean.id)) return {
|
|
||||||
code: 403,
|
|
||||||
msg: "用户无权访问此对话",
|
|
||||||
}
|
|
||||||
|
|
||||||
// 私聊
|
// 私聊
|
||||||
if (chat!.bean.type == 'private') {
|
if (chat!.bean.type == 'private') {
|
||||||
@@ -165,6 +161,7 @@ export default class ChatApi extends BaseApi {
|
|||||||
if (!UserChatLinker.checkUserIsLinkedToChat(token.author, chat!.bean.id)) return {
|
if (!UserChatLinker.checkUserIsLinkedToChat(token.author, chat!.bean.id)) return {
|
||||||
code: 403,
|
code: 403,
|
||||||
msg: "用户无权访问此对话",
|
msg: "用户无权访问此对话",
|
||||||
|
caused_by: 'NOT_IN_THIS_CHAT_MEMBER_LIST',
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -253,7 +250,7 @@ export default class ChatApi extends BaseApi {
|
|||||||
* @param token 令牌
|
* @param token 令牌
|
||||||
* @param target ID
|
* @param target ID
|
||||||
*/
|
*/
|
||||||
this.registerEvent("Chat.requestToBeMemberOfGroup", (args, { deviceId }) => {
|
this.registerEvent("Chat.requestJoinGroup", (args, { deviceId }) => {
|
||||||
if (this.checkArgsMissing(args, ['token', 'target'])) return {
|
if (this.checkArgsMissing(args, ['token', 'target'])) return {
|
||||||
msg: "参数缺失",
|
msg: "参数缺失",
|
||||||
code: 400,
|
code: 400,
|
||||||
|
|||||||
Reference in New Issue
Block a user