Removed unused parameter

This commit is contained in:
Michael 2021-05-20 04:44:45 +00:00
parent db8b0b9666
commit e10f3f26b9
3 changed files with 5 additions and 6 deletions

View file

@ -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);

View file

@ -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)) {

View file

@ -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'])) {