public function updateAttrs(MessageInterface $message) { $attrs = ['reason' => $message->getSkinny(), 'ticket_id' => $message->getTicketId()]; $tags = $message->getTags(); if ($assigned_id = $message->getAssignedId()) { $attrs['assigned_id'] = $assigned_id; } if ($tags->has('user')) { $attrs['user_id'] = $message->getUserId(); } if ($tags->has('priority')) { $attrs['priority'] = $tags->get('priority'); } if ($tags->has('org')) { $attrs['org_id'] = $message->getOrgId(); } return array_merge($attrs, $this->attrs($message)); }