mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 19:23:26 +00:00
no message
This commit is contained in:
parent
3f17c0689c
commit
6347454098
@ -185,15 +185,18 @@ class WebSocketDialog extends AbstractModel
|
|||||||
*/
|
*/
|
||||||
public function getGroupName()
|
public function getGroupName()
|
||||||
{
|
{
|
||||||
$name = $this->name;
|
if (!isset($this->appendattrs['groupName'])) {
|
||||||
if ($this->type == "group") {
|
$name = $this->name;
|
||||||
if ($this->group_type === 'project') {
|
if ($this->type == "group") {
|
||||||
$name = \DB::table('projects')->where('dialog_id', $this->id)->value('name');
|
if ($this->group_type === 'project') {
|
||||||
} elseif ($this->group_type === 'task') {
|
$name = \DB::table('projects')->where('dialog_id', $this->id)->value('name');
|
||||||
$name = \DB::table('project_tasks')->where('dialog_id', $this->id)->value('name');
|
} elseif ($this->group_type === 'task') {
|
||||||
|
$name = \DB::table('project_tasks')->where('dialog_id', $this->id)->value('name');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
$this->appendattrs['groupName'] = $name;
|
||||||
}
|
}
|
||||||
return $name;
|
return $this->appendattrs['groupName'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -195,8 +195,8 @@ class EmailNoticeTask extends AbstractTask
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$setting = Base::setting('emailSetting');
|
$setting = Base::setting('emailSetting');
|
||||||
$msgType = $dialogType === "group" ? "群聊" : "个人";
|
$msgType = $dialogType === "group" ? "群聊" : "成员";
|
||||||
$subject = env('APP_NAME') . " 未读{$msgType}消息提醒";
|
$subject = null;
|
||||||
$content = view('email.unread', [
|
$content = view('email.unread', [
|
||||||
'type' => 'head',
|
'type' => 'head',
|
||||||
'nickname' => $user->nickname,
|
'nickname' => $user->nickname,
|
||||||
@ -227,6 +227,14 @@ class EmailNoticeTask extends AbstractTask
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($subject === null) {
|
||||||
|
$count = count($lists);
|
||||||
|
if ($count > 1) {
|
||||||
|
$subject = "来自{$count}个{$msgType}未读消息提醒";
|
||||||
|
} else {
|
||||||
|
$subject = "来自{$dialogName}未读消息提醒";
|
||||||
|
}
|
||||||
|
}
|
||||||
$content .= view('email.unread', [
|
$content .= view('email.unread', [
|
||||||
'type' => 'content',
|
'type' => 'content',
|
||||||
'dialogUrl' => config("app.url") . "/manage/messenger/{$dialogId}",
|
'dialogUrl' => config("app.url") . "/manage/messenger/{$dialogId}",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user