diff --git a/src/Factory/Api/Mastodon/Conversation.php b/src/Factory/Api/Mastodon/Conversation.php index 70562f3a0d..d867dd0b2a 100644 --- a/src/Factory/Api/Mastodon/Conversation.php +++ b/src/Factory/Api/Mastodon/Conversation.php @@ -50,10 +50,10 @@ class Conversation extends BaseFactory $ids[] = $id; if (empty($last_status)) { - $last_status = DI::mstdnStatus()->createFromMailId($mail['id'], $mail['uid']); + $last_status = DI::mstdnStatus()->createFromMailId($mail['id']); } - $accounts[] = DI::mstdnAccount()->createFromContactId($id, $mail['uid']); + $accounts[] = DI::mstdnAccount()->createFromContactId($id, 0); } return new \Friendica\Object\Api\Mastodon\Conversation($id, $accounts, $unread, $last_status); diff --git a/src/Factory/Api/Mastodon/Status.php b/src/Factory/Api/Mastodon/Status.php index 23825591fb..3f16b3c380 100644 --- a/src/Factory/Api/Mastodon/Status.php +++ b/src/Factory/Api/Mastodon/Status.php @@ -123,12 +123,11 @@ class Status extends BaseFactory /** * @param int $uriId id of the mail - * @param int $uid mail user * @return \Friendica\Object\Api\Mastodon\Status * @throws HTTPException\InternalServerErrorException * @throws \ImagickException */ - public function createFromMailId(int $id, $uid) + public function createFromMailId(int $id) { $item = ActivityPub\Transmitter::ItemArrayFromMail($id, true); if (empty($item)) { diff --git a/src/Module/Api/Mastodon/Timelines/Direct.php b/src/Module/Api/Mastodon/Timelines/Direct.php index 5c454f2f6b..7bc03c895e 100644 --- a/src/Module/Api/Mastodon/Timelines/Direct.php +++ b/src/Module/Api/Mastodon/Timelines/Direct.php @@ -67,12 +67,12 @@ class Direct extends BaseApi $params['order'] = ['id']; } - $mails = DBA::select('mail', ['id', 'uid'], $condition, $params); + $mails = DBA::select('mail', ['id'], $condition, $params); $statuses = []; while ($mail = DBA::fetch($mails)) { - $statuses[] = DI::mstdnStatus()->createFromMailId($mail['id'], $mail['uid']); + $statuses[] = DI::mstdnStatus()->createFromMailId($mail['id']); } if (!empty($request['min_id'])) {