mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 15:55:13 +00:00
lemmy comment controls
This commit is contained in:
parent
d9e3e8430c
commit
1e7d61af9c
1 changed files with 16 additions and 0 deletions
|
@ -3320,6 +3320,11 @@ class Activity
|
|||
$item['edited'] = $item['created'];
|
||||
}
|
||||
|
||||
// lemmy comment controls
|
||||
if (isset($act->obj['commentEnabled']) && !$act->obj['commentsEnabled']) {
|
||||
$item['comment_policy'] = 'none';
|
||||
}
|
||||
|
||||
if ($item['mid'] === $item['parent_mid']) {
|
||||
// it is a parent node - decode the comment policy info if present
|
||||
if ($act->objprop('commentPolicy')) {
|
||||
|
@ -4680,6 +4685,17 @@ class Activity
|
|||
$item['body'] .= "\n\n" . '[audio]' . $a['href'] . '[/audio]';
|
||||
}
|
||||
}
|
||||
if (array_key_exists('type', $a) && stripos($a['type'], 'link') !== false) {
|
||||
if (ActivityStreams::is_url($a['href']) && !strpos($item['body'], $a['href'])) {
|
||||
$li = Url::get(z_root() . '/linkinfo?binurl=' . bin2hex($a['href']));
|
||||
if ($li['success'] && $li['body']) {
|
||||
$item['body'] .= "\n" . $li['body'];
|
||||
} else {
|
||||
$item['body'] .= "\n\n" . $a['href'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (array_key_exists('type', $a) && stripos($a['type'], 'activity') !== false) {
|
||||
if (self::share_not_in_body($item['body'])) {
|
||||
$item = self::get_quote($a['href'], $item);
|
||||
|
|
Loading…
Reference in a new issue