mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-06 09:27:05 +00:00
no message
This commit is contained in:
parent
2af899cfea
commit
8ca6b53224
@ -290,10 +290,16 @@ class WebSocketDialog extends AbstractModel
|
||||
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');
|
||||
switch ($this->group_type) {
|
||||
case 'project':
|
||||
$name = \DB::table('projects')->where('dialog_id', $this->id)->value('name');
|
||||
break;
|
||||
case 'task':
|
||||
$name = \DB::table('project_tasks')->where('dialog_id', $this->id)->value('name');
|
||||
break;
|
||||
case 'all':
|
||||
$name = Base::Lang('全体成员');
|
||||
break;
|
||||
}
|
||||
}
|
||||
$this->appendattrs['groupName'] = $name;
|
||||
|
||||
@ -15,7 +15,7 @@ class GenerateWebSocketDialogsAllGroup extends Migration
|
||||
{
|
||||
if (!WebSocketDialog::whereGroupType('all')->exists()) {
|
||||
$userids = User::whereNull('disable_at')->pluck('userid')->toArray();
|
||||
WebSocketDialog::createGroup(null, $userids, 'all');
|
||||
WebSocketDialog::createGroup("全体成员 All members", $userids, 'all');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user