Add Content Warning support for comments too
Doh!
This commit is contained in:
parent
69d157c319
commit
ada5c4cc6a
1 changed files with 3 additions and 2 deletions
|
@ -354,8 +354,9 @@ class ostatus {
|
||||||
}
|
}
|
||||||
|
|
||||||
$item["object-type"] = $xpath->query('activity:object-type/text()', $entry)->item(0)->nodeValue;
|
$item["object-type"] = $xpath->query('activity:object-type/text()', $entry)->item(0)->nodeValue;
|
||||||
|
$item["verb"] = $xpath->query('activity:verb/text()', $entry)->item(0)->nodeValue;
|
||||||
|
|
||||||
if ($item["object-type"] == ACTIVITY_OBJ_NOTE && $xpath->evaluate('boolean(atom:summary)', $entry)) {
|
if ($item["verb"] == ACTIVITY_POST && $xpath->evaluate('boolean(atom:summary)', $entry)) {
|
||||||
// Mastodon Content Warning
|
// Mastodon Content Warning
|
||||||
$clear_text = $xpath->query('atom:summary/text()', $entry)->item(0)->nodeValue;
|
$clear_text = $xpath->query('atom:summary/text()', $entry)->item(0)->nodeValue;
|
||||||
$hidden_text = $xpath->query('atom:content/text()', $entry)->item(0)->nodeValue;
|
$hidden_text = $xpath->query('atom:content/text()', $entry)->item(0)->nodeValue;
|
||||||
|
@ -370,7 +371,7 @@ class ostatus {
|
||||||
$item["body"] = add_page_info_to_body(html2bbcode($xpath->query('atom:content/text()', $entry)->item(0)->nodeValue));
|
$item["body"] = add_page_info_to_body(html2bbcode($xpath->query('atom:content/text()', $entry)->item(0)->nodeValue));
|
||||||
}
|
}
|
||||||
$item["object"] = $xml;
|
$item["object"] = $xml;
|
||||||
$item["verb"] = $xpath->query('activity:verb/text()', $entry)->item(0)->nodeValue;
|
|
||||||
|
|
||||||
/// @TODO
|
/// @TODO
|
||||||
/// Delete a message
|
/// Delete a message
|
||||||
|
|
Loading…
Reference in a new issue