protected function deleteNotary(array $channels, array $post) : bool
{
if (\strpos($post['delete_notary'], '|') === false) {
return false;
}
list($ch, $idx) = \explode('|', $post['delete_notary']);
if (!isset($channels[$ch])) {
return false;
}
$idx += 0;
if ($channels[$ch]['notaries'][$idx]) {
unset($channels[$ch]['notaries'][$idx]);
}
return \Airship\saveJSON(ROOT . '/config/channel_peers/' . $ch . '.json', $channels[$ch]['notaries']);
}