撤回消息的回显修复
This commit is contained in:
2
App.vue
2
App.vue
@@ -377,7 +377,7 @@ export default {
|
|||||||
data.notificationElem = {
|
data.notificationElem = {
|
||||||
detail: JSON.stringify({
|
detail: JSON.stringify({
|
||||||
revokerID: data.revokerID,
|
revokerID: data.revokerID,
|
||||||
revokerName: data.revokerNickname || data.revokerID
|
revokerNickName: data.revokerNickname || data.revokerID
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -307,9 +307,8 @@ export default {
|
|||||||
const result = await revokeMessage({
|
const result = await revokeMessage({
|
||||||
conversationID: this.storeCurrentConversation.conversationID,
|
conversationID: this.storeCurrentConversation.conversationID,
|
||||||
clientMsgID: this.source.clientMsgID,
|
clientMsgID: this.source.clientMsgID,
|
||||||
// 当前用户的id和name
|
|
||||||
revokerName: this.storeSelfInfo.nickname,
|
|
||||||
revokerID: this.storeSelfInfo.userID,
|
revokerID: this.storeSelfInfo.userID,
|
||||||
|
revokerNickname: this.storeSelfInfo.nickname
|
||||||
});
|
});
|
||||||
|
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|||||||
@@ -305,8 +305,9 @@ export const tipMessaggeFormat = (msg, currentUserID) => {
|
|||||||
case MessageType.RevokeMessage:
|
case MessageType.RevokeMessage:
|
||||||
try {
|
try {
|
||||||
const revokeDetails = JSON.parse(msg.notificationElem.detail);
|
const revokeDetails = JSON.parse(msg.notificationElem.detail);
|
||||||
|
console.log(revokeDetails, '撤回消息')
|
||||||
const revokerID = revokeDetails.revokerID;
|
const revokerID = revokeDetails.revokerID;
|
||||||
const revokerName = revokeDetails.revokerName || "未知用户";
|
const revokerName = revokeDetails.revokerNickname || "未知用户";
|
||||||
|
|
||||||
if (revokerID === currentUserID) {
|
if (revokerID === currentUserID) {
|
||||||
return "你撤回了一条消息";
|
return "你撤回了一条消息";
|
||||||
|
|||||||
Reference in New Issue
Block a user