Skip to content

Commit

Permalink
fix: 修复本人撤回逻辑问题.
Browse files Browse the repository at this point in the history
  • Loading branch information
Evansy authored Jul 24, 2023
1 parent 74675c4 commit e1359c4
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/stores/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,7 @@ export const useChatStore = defineStore('chat', () => {
if (typeof data.recallUid === 'number') {
const cacheUser = cachedStore.userCachedList[data.recallUid]
// 如果撤回者的 id 不等于消息发送人的 id, 或者你本人就是管理员,那么显示管理员撤回的。
if (
data.recallUid !== message.fromUser.uid ||
(data.recallUid === userInfo.uid && isAdmin.value)
) {
if (data.recallUid !== message.fromUser.uid) {
message.message.body = `管理员"${cacheUser.name}"撤回了一条成员消息` // 后期根据本地用户数据修改
} else {
// 如果被撤回的消息是消息发送者撤回,正常显示
Expand Down

0 comments on commit e1359c4

Please sign in to comment.