mirror of
https://github.com/kuaifan/dootask.git
synced 2026-02-28 12:50:48 +00:00
no message
This commit is contained in:
parent
a9950a4365
commit
08883ce558
@ -121,7 +121,7 @@ class WebSocketDialog extends AbstractModel
|
||||
}
|
||||
if ($hasData === true) {
|
||||
$msgBuilder = WebSocketDialogMsg::whereDialogId($this->id);
|
||||
$this->has_tag = $msgBuilder->clone()->where('tag', '>', 0)->exists();
|
||||
$this->has_tag = $msgBuilder->clone()->whereMtype('tag')->exists();
|
||||
$this->has_image = $msgBuilder->clone()->whereMtype('image')->exists();
|
||||
$this->has_file = $msgBuilder->clone()->whereMtype('file')->exists();
|
||||
$this->has_link = $msgBuilder->clone()->whereLink(1)->exists();
|
||||
|
||||
17
resources/assets/js/store/actions.js
vendored
17
resources/assets/js/store/actions.js
vendored
@ -1929,11 +1929,24 @@ export default {
|
||||
} else if ($A.isJson(data)) {
|
||||
const index = state.cacheDialogs.findIndex(({id}) => id == data.dialog_id);
|
||||
if (index > -1) {
|
||||
dispatch("saveDialog", {
|
||||
const updateData = {
|
||||
id: data.dialog_id,
|
||||
last_msg: data,
|
||||
last_at: $A.formatDate("Y-m-d H:i:s")
|
||||
});
|
||||
}
|
||||
if (data.mtype == 'tag') {
|
||||
updateData.has_tag = true;
|
||||
}
|
||||
if (data.mtype == 'image') {
|
||||
updateData.has_image = true;
|
||||
}
|
||||
if (data.mtype == 'file') {
|
||||
updateData.has_file = true;
|
||||
}
|
||||
if (data.link) {
|
||||
updateData.has_link = true;
|
||||
}
|
||||
dispatch("saveDialog", updateData);
|
||||
} else {
|
||||
dispatch("getDialogOne", data.dialog_id).catch(() => {})
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user