X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FObject%2FPost.php;h=d2c0b31e102b436e60adb731fb4ff93bba94d662;hb=ab5a447bc2261522d0f5560f8933dd928a6fc6e3;hp=925f752c9a4592b481a6587cce14ce36d18aa8b5;hpb=a7fac5a76fef1be6722e41c91ae3a6601a36110c;p=friendica.git diff --git a/src/Object/Post.php b/src/Object/Post.php index 925f752c9a..d2c0b31e10 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -287,8 +287,8 @@ class Post $responses = []; foreach ($response_verbs as $value => $verb) { $responses[$verb] = [ - 'self' => $conv_responses[$verb][$item['uri']]['self'] ?? 0, - 'output' => !empty($conv_responses[$verb][$item['uri']]) ? format_activity($conv_responses[$verb][$item['uri']]['links'], $verb, $item['uri']) : '', + 'self' => $conv_responses[$verb][$item['uri-id']]['self'] ?? 0, + 'output' => !empty($conv_responses[$verb][$item['uri-id']]) ? format_activity($conv_responses[$verb][$item['uri-id']]['links'], $verb, $item['uri-id']) : '', ]; } @@ -307,17 +307,15 @@ class Post if ($this->isToplevel()) { if(local_user()) { - $thread = PostModel::selectFirstThreadForUser(local_user(), ['ignored'], ['iid' => $item['id']]); - if (DBA::isResult($thread)) { - $ignore = [ - 'do' => DI::l10n()->t("ignore thread"), - 'undo' => DI::l10n()->t("unignore thread"), - 'toggle' => DI::l10n()->t("toggle ignore status"), - 'classdo' => $thread['ignored'] ? "hidden" : "", - 'classundo' => $thread['ignored'] ? "" : "hidden", - 'ignored' => DI::l10n()->t('ignored'), - ]; - } + $ignored = PostModel\ThreadUser::getIgnored($item['uri-id'], local_user()); + $ignore = [ + 'do' => DI::l10n()->t("ignore thread"), + 'undo' => DI::l10n()->t("unignore thread"), + 'toggle' => DI::l10n()->t("toggle ignore status"), + 'classdo' => $ignored ? "hidden" : "", + 'classundo' => $ignored ? "" : "hidden", + 'ignored' => DI::l10n()->t('ignored'), + ]; if ($conv->getProfileOwner() == local_user() && ($item['uid'] != 0)) { if ($origin) {