diff --git a/app/Tasks/EmailNoticeTask.php b/app/Tasks/EmailNoticeTask.php
index ebc18fd08..3d7b8c0ac 100644
--- a/app/Tasks/EmailNoticeTask.php
+++ b/app/Tasks/EmailNoticeTask.php
@@ -239,7 +239,7 @@ class EmailNoticeTask extends AbstractTask
}
$content .= view('email.unread', [
'type' => 'content',
- 'dialogUrl' => config("app.url") . "/manage/messenger/{$dialogId}",
+ 'dialogUrl' => config("app.url") . "/manage/messenger?dialog_id={$dialogId}",
'dialogName' => $dialogName,
'unread' => count($items),
'items' => $items,
diff --git a/resources/assets/js/pages/manage/components/DialogView.vue b/resources/assets/js/pages/manage/components/DialogView.vue
index 100634b49..faea3cabc 100644
--- a/resources/assets/js/pages/manage/components/DialogView.vue
+++ b/resources/assets/js/pages/manage/components/DialogView.vue
@@ -8,10 +8,7 @@
+ v-longpress="{callback: handleLongpress, delay: 300}">
@@ -170,7 +167,7 @@ export default {
},
computed: {
- ...mapState(['dialogMsgs', 'audioPlaying', 'windowActive']),
+ ...mapState(['audioPlaying', 'windowActive']),
viewClass() {
const {msgData, operateAction, operateEnter} = this;
@@ -251,18 +248,13 @@ export default {
methods: {
handleLongpress(event, el) {
- this.$emit("on-longpress", {
- event,
- el,
- msgData: this.msgData
- })
+ this.$emit("on-longpress", {event, el, msgData: this.msgData})
},
msgRead() {
- if (!this.windowActive || this.msgData._r === true) {
+ if (!this.windowActive) {
return;
}
- this.msgData._r = true;
this.$store.dispatch("dialogMsgRead", this.msgData);
},
diff --git a/resources/assets/js/pages/manage/messenger.vue b/resources/assets/js/pages/manage/messenger.vue
index 701d5feed..2a756b078 100644
--- a/resources/assets/js/pages/manage/messenger.vue
+++ b/resources/assets/js/pages/manage/messenger.vue
@@ -179,6 +179,13 @@ export default {
}
},
+ mounted() {
+ const id = $A.runNum(this.$route.query.dialog_id);
+ if (id > 0) {
+ this.openDialog(id)
+ }
+ },
+
activated() {
this.updateDialogs(1000);
},
@@ -332,6 +339,7 @@ export default {
break;
}
},
+
contactsKey(val) {
if (val == '') {
return;
@@ -344,6 +352,7 @@ export default {
this.contactsLoad--;
}, 600);
},
+
tabActive: {
handler(val) {
if (val == 'contacts') {
@@ -361,6 +370,7 @@ export default {
},
immediate: true
},
+
dialogId: {
handler(id) {
if (id > 0) {