public function appendMessages($hook, $type, $response, $params)
{
if (!$response instanceof AjaxResponse) {
return;
}
$response->getData()->_elgg_msgs = (object) $this->msgs->dumpRegister();
return $response;
}