QAQ
This commit is contained in:
@@ -83,6 +83,7 @@
|
||||
import TUIChatConfig from '../config'
|
||||
import { useAuthUser } from '../../../../composables/useAuthUser'
|
||||
import { useUI } from '../../../../utils/use-ui'
|
||||
import { getGroupBanList } from '../../../../api'
|
||||
|
||||
interface IProps {
|
||||
placeholder: string
|
||||
@@ -171,15 +172,23 @@
|
||||
const getMuteTime = async (displayType: ToolbarDisplayType) => {
|
||||
TUIGroupService.getGroupProfile({
|
||||
groupID: props.groupID
|
||||
}).then(res => {
|
||||
}).then(async res => {
|
||||
// muteAllMembers
|
||||
console.log(res.data.group.muteAllMembers)
|
||||
if (res.data.group.muteAllMembers) {
|
||||
// 禁言了
|
||||
showDialog('提示', '当前群组已全员禁言', false)
|
||||
} else {
|
||||
// emits('changeToolbarDisplayType', displayType)
|
||||
// 判断某个成员是不是禁言
|
||||
const list = await getGroupBanList(props.groupID)
|
||||
const show = list.data.MutedAccountList.find(
|
||||
(v: any) => v.Member_Account === tencentUserSig.value.userId
|
||||
)
|
||||
if (show?.Member_Account) {
|
||||
showDialog('提示', '你被禁言了', false)
|
||||
} else {
|
||||
emits('changeToolbarDisplayType', displayType)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import OfflinePushInfoManager, {
|
||||
} from '../offlinePushInfoManager/index'
|
||||
import { useAuthUser } from '../../../../composables/useAuthUser'
|
||||
import { useUI } from '../../../../utils/use-ui'
|
||||
import { getGroupBanList } from '../../../../api'
|
||||
|
||||
export const sendMessageErrorCodeMap: Map<number, string> = new Map([
|
||||
[3123, '文本包含本地审核拦截词'],
|
||||
@@ -130,6 +131,21 @@ export const sendMessages = async (
|
||||
showDialog('提示', '当前群组已全员禁言', false)
|
||||
} else {
|
||||
// 判断某个成员是不是禁言
|
||||
const list = await getGroupBanList(
|
||||
currentConversation?.groupProfile?.groupID
|
||||
)
|
||||
const show = list.data.MutedAccountList.find(
|
||||
(v: any) =>
|
||||
v.Member_Account === tencentUserSig.value.userId
|
||||
)
|
||||
if (show?.Member_Account) {
|
||||
showDialog('提示', '你被禁言了', false)
|
||||
} else {
|
||||
await TUIChatService.sendTextMessage(
|
||||
options,
|
||||
sendMessageOptions
|
||||
)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
await TUIChatService.sendTextMessage(
|
||||
|
||||
Reference in New Issue
Block a user