Merge remote-tracking branch 'upstream/develop' into quote

This commit is contained in:
Michael 2022-10-30 11:38:17 +00:00
commit eae1383f48
5 changed files with 12 additions and 21 deletions

View file

@ -59,7 +59,6 @@
"bower-asset/chart-js": "^2.8", "bower-asset/chart-js": "^2.8",
"bower-asset/dompurify": "^1.0", "bower-asset/dompurify": "^1.0",
"bower-asset/fork-awesome": "^1.1", "bower-asset/fork-awesome": "^1.1",
"bower-asset/vue": "^2.6",
"npm-asset/cropperjs": "1.2.2", "npm-asset/cropperjs": "1.2.2",
"npm-asset/es-jquery-sortable": "^0.9.13", "npm-asset/es-jquery-sortable": "^0.9.13",
"npm-asset/fullcalendar": "^3.10", "npm-asset/fullcalendar": "^3.10",

18
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "c851fbba46ed090d0fbaf68e9b3b94df", "content-hash": "e8626dc6957dff9cc783daad10cfc26f",
"packages": [ "packages": [
{ {
"name": "asika/simple-console", "name": "asika/simple-console",
@ -241,22 +241,6 @@
], ],
"time": "2021-08-26T18:46:39+00:00" "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", "name": "brick/math",
"version": "0.9.3", "version": "0.9.3",

View file

@ -83,7 +83,10 @@ class Notification extends BaseFactory
public static function getType(Entity\Notification $Notification): string public static function getType(Entity\Notification $Notification): string
{ {
if (($Notification->verb == Activity::FOLLOW) && ($Notification->type === Post\UserNotification::TYPE_NONE)) { 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; $type = $contact['pending'] ? MstdnNotification::TYPE_INTRODUCTION : MstdnNotification::TYPE_FOLLOW;
} elseif (($Notification->verb == Activity::ANNOUNCE) && } elseif (($Notification->verb == Activity::ANNOUNCE) &&
in_array($Notification->type, [Post\UserNotification::TYPE_DIRECT_COMMENT, Post\UserNotification::TYPE_DIRECT_THREAD_COMMENT])) { in_array($Notification->type, [Post\UserNotification::TYPE_DIRECT_COMMENT, Post\UserNotification::TYPE_DIRECT_THREAD_COMMENT])) {

View file

@ -3418,7 +3418,7 @@ class Item
$percent = $option['replies'] / $question['voters'] * 100; $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)); $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 { } 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']);
} }
} }

View file

@ -47,7 +47,12 @@ class FollowRequests extends BaseApi
self::checkAllowedScope(self::SCOPE_FOLLOW); self::checkAllowedScope(self::SCOPE_FOLLOW);
$uid = self::getCurrentUserID(); $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; $contactId = $introduction->cid;