perf: 消息撤回后直接删除消息

This commit is contained in:
Mr.Huan 2022-01-24 10:37:10 +08:00
parent ce0c86c8e5
commit 14b699b5b1
2 changed files with 6 additions and 3 deletions

View File

@ -361,10 +361,11 @@ class DialogController extends AbstractController
// 直接删除消息
$msg->delete();
/* 原始需求:消息直接删除,无需提示 */
// 发送撤回指令
WebSocketDialogMsg::sendMsg($msg->dialog_id, 'withdraw', [
"msg_id" => $msg->id, // 被撤回的消息Id
], $user->userid);
// WebSocketDialogMsg::sendMsg($msg->dialog_id, 'withdraw', [
// "msg_id" => $msg->id, // 被撤回的消息Id
// ], $user->userid);
return Base::retSuccess("success");
}
}

View File

@ -67,6 +67,8 @@ export default {
method: 'get',
}).then(({data, msg}) => {
// data
$A.messageSuccess("消息已撤回");
this.$store.dispatch("getDialogMsgs", this.dialogData.id);
// msg
}).catch(({msg}) => {
// msg