diff --git a/composer.json b/composer.json index 43cb7a3fd..34c0f6258 100644 --- a/composer.json +++ b/composer.json @@ -59,7 +59,6 @@ "bower-asset/chart-js": "^2.8", "bower-asset/dompurify": "^1.0", "bower-asset/fork-awesome": "^1.1", - "bower-asset/vue": "^2.6", "npm-asset/cropperjs": "1.2.2", "npm-asset/es-jquery-sortable": "^0.9.13", "npm-asset/fullcalendar": "^3.10", diff --git a/composer.lock b/composer.lock index 96949561b..786880fab 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c851fbba46ed090d0fbaf68e9b3b94df", + "content-hash": "e8626dc6957dff9cc783daad10cfc26f", "packages": [ { "name": "asika/simple-console", @@ -241,22 +241,6 @@ ], "time": "2021-08-26T18:46:39+00:00" }, - { - "name": "bower-asset/vue", - "version": "v2.7.10", - "source": { - "type": "git", - "url": "https://github.com/vuejs/vue.git", - "reference": "ee57d9fd1d51abe245c6c37e6f8f2d45977b929e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vuejs/vue/zipball/ee57d9fd1d51abe245c6c37e6f8f2d45977b929e", - "reference": "ee57d9fd1d51abe245c6c37e6f8f2d45977b929e", - "shasum": "" - }, - "type": "bower-asset-library" - }, { "name": "brick/math", "version": "0.9.3", diff --git a/src/Factory/Api/Mastodon/Notification.php b/src/Factory/Api/Mastodon/Notification.php index 33c252e4f..adaf2d868 100644 --- a/src/Factory/Api/Mastodon/Notification.php +++ b/src/Factory/Api/Mastodon/Notification.php @@ -83,7 +83,10 @@ class Notification extends BaseFactory public static function getType(Entity\Notification $Notification): string { if (($Notification->verb == Activity::FOLLOW) && ($Notification->type === Post\UserNotification::TYPE_NONE)) { - $contact = Contact::getById($Notification->actorId, ['pending']); + $contact = Contact::getById($Notification->actorId, ['pending', 'uri-id', 'uid']); + if (($contact['uid'] == 0) && !empty($contact['uri-id'])) { + $contact = Contact::selectFirst(['pending'], ['uri-id' => $contact['uri-id'], 'uid' => $Notification->uid]); + } $type = $contact['pending'] ? MstdnNotification::TYPE_INTRODUCTION : MstdnNotification::TYPE_FOLLOW; } elseif (($Notification->verb == Activity::ANNOUNCE) && in_array($Notification->type, [Post\UserNotification::TYPE_DIRECT_COMMENT, Post\UserNotification::TYPE_DIRECT_THREAD_COMMENT])) { diff --git a/src/Model/Item.php b/src/Model/Item.php index d148bf273..73bd583a7 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -3418,7 +3418,7 @@ class Item $percent = $option['replies'] / $question['voters'] * 100; $options[$key]['vote'] = DI::l10n()->tt('%2$s (%3$d%%, %1$d vote)', '%2$s (%3$d%%, %1$d votes)', $option['replies'], $option['name'], round($percent, 1)); } else { - $options[$key]['vote'] = DI::l10n()->tt('%2$s (%1$d vote)', '%2$s (%1$d votes)', $option['replies'], $option['name'], ); + $options[$key]['vote'] = DI::l10n()->tt('%2$s (%1$d vote)', '%2$s (%1$d votes)', $option['replies'], $option['name']); } } diff --git a/src/Module/Api/Mastodon/FollowRequests.php b/src/Module/Api/Mastodon/FollowRequests.php index 99e20cd7f..af08517e9 100644 --- a/src/Module/Api/Mastodon/FollowRequests.php +++ b/src/Module/Api/Mastodon/FollowRequests.php @@ -47,7 +47,12 @@ class FollowRequests extends BaseApi self::checkAllowedScope(self::SCOPE_FOLLOW); $uid = self::getCurrentUserID(); - $introduction = DI::intro()->selectOneById($this->parameters['id'], $uid); + $cdata = Contact::getPublicAndUserContactID($this->parameters['id'], $uid); + if (empty($cdata['user'])) { + throw new HTTPException\NotFoundException('Contact not found'); + } + + $introduction = DI::intro()->selectForContact($cdata['user']); $contactId = $introduction->cid;