function setContactOrder($attribute, $reverse)
{
if (!in_array($reverse, ['true', 'false']) || !in_array($attribute, ['lastmsg', 'label'])) {
return new JSONResponse(array("status" => false, "msg" => "Invalid contact ordering"), Http::STATUS_BAD_REQUEST);
}
$this->configMapper->set("contact_order", $attribute);
$this->configMapper->set("contact_order_reverse", $reverse);
return new JSONResponse(array("status" => true, "msg" => "OK"));
}