mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-04 16:37:06 +00:00
no message
This commit is contained in:
parent
3f17c0689c
commit
6347454098
@ -185,15 +185,18 @@ class WebSocketDialog extends AbstractModel
|
||||
*/
|
||||
public function getGroupName()
|
||||
{
|
||||
$name = $this->name;
|
||||
if ($this->type == "group") {
|
||||
if ($this->group_type === 'project') {
|
||||
$name = \DB::table('projects')->where('dialog_id', $this->id)->value('name');
|
||||
} elseif ($this->group_type === 'task') {
|
||||
$name = \DB::table('project_tasks')->where('dialog_id', $this->id)->value('name');
|
||||
if (!isset($this->appendattrs['groupName'])) {
|
||||
$name = $this->name;
|
||||
if ($this->type == "group") {
|
||||
if ($this->group_type === 'project') {
|
||||
$name = \DB::table('projects')->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;
|
||||
}
|
||||
$setting = Base::setting('emailSetting');
|
||||
$msgType = $dialogType === "group" ? "群聊" : "个人";
|
||||
$subject = env('APP_NAME') . " 未读{$msgType}消息提醒";
|
||||
$msgType = $dialogType === "group" ? "群聊" : "成员";
|
||||
$subject = null;
|
||||
$content = view('email.unread', [
|
||||
'type' => 'head',
|
||||
'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', [
|
||||
'type' => 'content',
|
||||
'dialogUrl' => config("app.url") . "/manage/messenger/{$dialogId}",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user