diff --git a/module/webhook/model.php b/module/webhook/model.php index 16eaef5907..0f7ea1983b 100644 --- a/module/webhook/model.php +++ b/module/webhook/model.php @@ -86,7 +86,15 @@ class webhookModel extends model $object->$field = ''; } - $text = substr($data->text, 0, strpos($data->text, '(http')) ? substr($data->text, 0, strpos($data->text, '(http')) : zget($users, $data->user, $this->app->user->realname) . $this->lang->action->label->{$action->action} . $this->lang->action->objectTypes[$action->objectType] . "[#{$action->objectID}::{$object->$field}]"; + $text = ''; + if(isset($data->markdown) and is_object($data->markdown)) + { + $text = substr($data->markdown->text, 0, strpos($data->markdown->text, '(http')); + } + else + { + $text = substr($data->text, 0, strpos($data->text, '(http')) ? substr($data->text, 0, strpos($data->text, '(http')) : zget($users, $data->user, $this->app->user->realname) . $this->lang->action->label->{$action->action} . $this->lang->action->objectTypes[$action->objectType] . "[#{$action->objectID}::{$object->$field}]"; + } $log->action = $text; $log->actionURL = $this->getViewLink($action->objectType, $action->objectID); diff --git a/module/webhook/view/create.html.php b/module/webhook/view/create.html.php index 3f3ffb8526..6ca7b6f35e 100644 --- a/module/webhook/view/create.html.php +++ b/module/webhook/view/create.html.php @@ -18,7 +18,7 @@