class Conversation
{
+ const MODE_CHANNEL = 'channel';
const MODE_COMMUNITY = 'community';
const MODE_CONTACTS = 'contacts';
const MODE_CONTACT_POSTS = 'contact-posts';
. (!empty($_GET['cmin']) ? '&cmin=' . rawurlencode($_GET['cmin']) : '')
. (!empty($_GET['cmax']) ? '&cmax=' . rawurlencode($_GET['cmax']) : '')
. (!empty($_GET['file']) ? '&file=' . rawurlencode($_GET['file']) : '')
-
+ . (!empty($_GET['channel']) ? '&channel=' . rawurlencode($_GET['channel']) : '')
+ . (!empty($_GET['no_sharer']) ? '&no_sharer=' . rawurlencode($_GET['no_sharer']) : '')
+ . (!empty($_GET['accounttype']) ? '&accounttype=' . rawurlencode($_GET['accounttype']) : '')
. "'; </script>\r\n";
}
} elseif ($mode === self::MODE_PROFILE) {
. "<script> var profile_uid = " . ($this->session->getLocalUserId() ?: 0) . ";"
. "</script>";
}
+ } elseif ($mode === self::MODE_CHANNEL) {
+ $items = $this->addChildren($items, true, $order, $uid, $mode, $ignoredGsids);
+
+ if (!$update) {
+ $live_update_div = '<div id="live-channel"></div>' . "\r\n"
+ . "<script> var profile_uid = -1; var netargs = '" . substr($this->args->getCommand(), 8)
+ . '?f='
+ . (!empty($_GET['no_sharer']) ? '&no_sharer=' . rawurlencode($_GET['no_sharer']) : '')
+ . (!empty($_GET['accounttype']) ? '&accounttype=' . rawurlencode($_GET['accounttype']) : '')
+ . "'; </script>\r\n";
+ }
} elseif ($mode === self::MODE_COMMUNITY) {
$items = $this->addChildren($items, true, $order, $uid, $mode, $ignoredGsids);
unset($conv_responses['dislike']);
}
- if (in_array($mode, [self::MODE_COMMUNITY, self::MODE_CONTACTS, self::MODE_PROFILE])) {
+ if (in_array($mode, [self::MODE_CHANNEL, self::MODE_COMMUNITY, self::MODE_CONTACTS, self::MODE_PROFILE])) {
$writable = true;
} else {
$writable = $items[0]['writable'] || ($items[0]['uid'] == 0) && in_array($items[0]['network'], Protocol::FEDERATED);
continue;
}
- if (in_array($row['author-gsid'], $ignoredGsids)
+ if (
+ in_array($row['author-gsid'], $ignoredGsids)
|| in_array($row['owner-gsid'], $ignoredGsids)
|| in_array($row['causer-gsid'], $ignoredGsids)
) {
$items[$key]['user-collapsed-owner'] = !$always_display && in_array($row['owner-id'], $collapses);
if (
- in_array($mode, [self::MODE_COMMUNITY, self::MODE_NETWORK]) &&
+ in_array($mode, [self::MODE_CHANNEL, self::MODE_COMMUNITY, self::MODE_NETWORK]) &&
(in_array($row['author-id'], $blocks) || in_array($row['owner-id'], $blocks) || in_array($row['author-id'], $ignores) || in_array($row['owner-id'], $ignores))
) {
unset($items[$key]);