MCPcopy
hub / github.com/nodeWechat/wechat4u / revokeMsg

Method revokeMsg

src/core.js:1186–1207  ·  view source on GitHub ↗
(msgId, toUserName)

Source from the content-addressed store, hash-verified

1184 }
1185
1186 revokeMsg (msgId, toUserName) {
1187 return Promise.resolve().then(() => {
1188 let data = {
1189 BaseRequest: this.getBaseRequest(),
1190 SvrMsgId: msgId,
1191 ToUserName: toUserName,
1192 ClientMsgId: getClientMsgId()
1193 }
1194 return this.request({
1195 method: 'POST',
1196 url: this.CONF.API_webwxrevokemsg,
1197 data: data
1198 }).then(res => {
1199 let data = res.data
1200 assert.equal(data.BaseResponse.Ret, 0, res)
1201 return data
1202 })
1203 }).catch(err => {
1204 debug(err)
1205 throw new Error('撤回消息失败')
1206 })
1207 }
1208
1209 getBaseRequest () {
1210 return {

Callers 1

run-core.jsFile · 0.80

Calls 2

getBaseRequestMethod · 0.95
getClientMsgIdFunction · 0.90

Tested by

no test coverage detected