| @@ -158,19 +158,18 @@ | ||
| 158 | 158 | $notification->users()->attach($userIdsWhoGetNotification); |
| 159 | 159 | } |
| 160 | 160 | } |
| 161 | 161 | |
| 162 | - public function changeTitleOrDescriptionNotification($task, $col, $oldTask) | |
| 162 | + public function changeTitleNotification($task, $col, $oldTask) | |
| 163 | 163 | { |
| 164 | + if ($col !== 'title') { | |
| 165 | + return; | |
| 166 | + } | |
| 167 | + | |
| 164 | 168 | $userIdsWhoGetNotification = $this->findUsersWhoWillGetNotification($task); |
| 165 | 169 | if(count($userIdsWhoGetNotification) > 0){ |
| 166 | - if($col == 'title'){ | |
| 167 | - $action = 'task_title_updated'; | |
| 168 | - $message = $task->title; | |
| 169 | - }else{ | |
| 170 | - $action = 'task_description_updated'; | |
| 171 | - $message = $task->description; | |
| 172 | - } | |
| 170 | + $action = 'task_title_updated'; | |
| 171 | + $message = $task->title; | |
| 173 | 172 | $notification = $this->createNotification($task, Constant::OBJECT_TYPE_BOARD_NOTIFICATION, $action, $message); |
| 174 | 173 | $notification->users()->attach($userIdsWhoGetNotification); |
| 175 | 174 | } |
| 176 | 175 | } |