diff --git a/pages/conversation/chating/components/MessageItem/index.vue b/pages/conversation/chating/components/MessageItem/index.vue index ce04d3b..bcbe5bb 100644 --- a/pages/conversation/chating/components/MessageItem/index.vue +++ b/pages/conversation/chating/components/MessageItem/index.vue @@ -304,10 +304,13 @@ export default { }); // 撤回消息 - const result = await revokeMessage( - this.storeCurrentConversation.conversationID, - this.source.clientMsgID - ); + const result = await revokeMessage({ + conversationID: this.storeCurrentConversation.conversationID, + clientMsgID: this.source.clientMsgID, + // 当前用户的id和name + revokerName: this.storeSelfInfo.nickname, + revokerID: this.storeSelfInfo.userID, + }); uni.hideLoading(); diff --git a/util/revokeMessage.js b/util/revokeMessage.js index 381ec6c..e129ca1 100644 --- a/util/revokeMessage.js +++ b/util/revokeMessage.js @@ -6,7 +6,7 @@ import IMSDK, { MessageStatus } from "openim-uniapp-polyfill"; * @param {string} clientMsgID - 消息客户端ID * @returns {Promise} 撤回结果 */ -export const revokeMessage = async (conversationID, clientMsgID) => { +export const revokeMessage = async ({conversationID, clientMsgID, revokerName, revokerId}) => { try { const result = await IMSDK.asyncApi( IMSDK.IMMethods.RevokeMessage,