(msgId, toUserName)
| 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 { |
no test coverage detected