Skip to content

Commit

Permalink
Fix error for draft emails
Browse files Browse the repository at this point in the history
  • Loading branch information
fulldecent authored Sep 18, 2023
1 parent baa36bb commit f896e68
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Providers/SidebarWebhookServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ public function boot()
$this->loadViewsFrom(__DIR__.'/../Resources/views', self::MODULE_NAME);

\Eventy::addAction('conversation.after_prev_convs', function($customer, $conversation, $mailbox) {
// Skip if no customer (e.g. a draft email)
if (empty($customer)) {
return;
}

$payload = [
'customerEmail' => $customer->getMainEmail(),
'customerPhones' => $customer->getPhones(),
Expand Down

0 comments on commit f896e68

Please sign in to comment.