* Finish task#7346.
This commit is contained in:
@@ -87,10 +87,14 @@ class webhookModel extends model
|
||||
}
|
||||
|
||||
$text = '';
|
||||
if(isset($data->markdown) and is_object($data->markdown))
|
||||
if(isset($data->markdown->text))
|
||||
{
|
||||
$text = substr($data->markdown->text, 0, strpos($data->markdown->text, '(http'));
|
||||
}
|
||||
elseif(isset($data->markdown->content))
|
||||
{
|
||||
$text = substr($data->markdown->content, 0, strpos($data->markdown->content, '(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}]";
|
||||
@@ -321,9 +325,9 @@ class webhookModel extends model
|
||||
$this->saveData($id, $actionID, $postData, $actor);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
$result = $this->fetchHook($webhook, $postData, $actionID);
|
||||
$this->saveLog($webhook, $actionID, $postData, $result);
|
||||
if(!empty($result)) $this->saveLog($webhook, $actionID, $postData, $result);
|
||||
}
|
||||
return !dao::isError();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user