When the list of moderated instances can be accessed, make “Threads” field default to “accessible”
This commit is contained in:
parent
3c25982faf
commit
5a473b6064
1 changed files with 1 additions and 0 deletions
|
@ -378,6 +378,7 @@ if ($idata['IsMastodon'] && $idata['Version']>='4.0.0') {
|
|||
if (is_array($buf)) {
|
||||
eecho(1,'«'.$opts['hostname'].'»: got instance domain blocks from API v1 :-)'.N);
|
||||
$idata['blocks']=[];
|
||||
$idata['Threads']='accessible';
|
||||
foreach ($buf as $key=>$block) {
|
||||
if (make(['domain', 'digest', 'severity', 'comment'],$block) && is_string($block['domain']) && !isempty($block['domain']) && is_string($block['digest']) && preg_match('/^[a-f0-9]{64}$/',$block['digest'])===1 && is_string($block['severity']) && in_array($block['severity'], ['silence','suspend']) && (is_null($block['comment']) || is_string($block['comment']))) {
|
||||
if (!is_null($block['comment']) && trim($block['comment'])=='') $block['comment']=null;
|
||||
|
|
Loading…
Reference in a new issue