mirror of
https://github.com/freescout-helpdesk/freescout.git
synced 2024-11-24 11:22:42 +01:00
Entities hooks
This commit is contained in:
parent
ae861da89d
commit
66d45bf7f6
@ -37,5 +37,12 @@ class ConversationObserver
|
||||
public function deleting(Conversation $conversation)
|
||||
{
|
||||
$conversation->threads()->delete();
|
||||
|
||||
\Eventy::action('conversation.deleting', $conversation);
|
||||
}
|
||||
|
||||
public function updated(Conversation $conversation)
|
||||
{
|
||||
\Eventy::action('conversation.updated', $conversation);
|
||||
}
|
||||
}
|
||||
|
@ -74,5 +74,17 @@ class ThreadObserver
|
||||
) {
|
||||
Conversation::refreshConversations($conversation, $thread);
|
||||
}
|
||||
|
||||
\Eventy::action('thread.created', $thread);
|
||||
}
|
||||
|
||||
public function deleting(Thread $thread)
|
||||
{
|
||||
\Eventy::action('thread.deleting', $thread);
|
||||
}
|
||||
|
||||
public function updated(Thread $thread)
|
||||
{
|
||||
\Eventy::action('thread.updated', $thread);
|
||||
}
|
||||
}
|
||||
|
@ -56,6 +56,7 @@ class Thread extends Model
|
||||
//self::TYPE_FORWARDPARENT => 'forwardparent',
|
||||
// forwardchild is the type set on the first thread of the new forwarded conversation.
|
||||
//self::TYPE_FORWARDCHILD => 'forwardchild',
|
||||
// Not used.
|
||||
self::TYPE_CHAT => 'chat',
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user