Removed unused parameter

pull/10276/head
Michael 2021-05-20 04:44:45 +00:00
rodzic db8b0b9666
commit e10f3f26b9
3 zmienionych plików z 5 dodań i 6 usunięć

Wyświetl plik

@ -50,10 +50,10 @@ class Conversation extends BaseFactory
$ids[] = $id; $ids[] = $id;
if (empty($last_status)) { 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); return new \Friendica\Object\Api\Mastodon\Conversation($id, $accounts, $unread, $last_status);

Wyświetl plik

@ -123,12 +123,11 @@ class Status extends BaseFactory
/** /**
* @param int $uriId id of the mail * @param int $uriId id of the mail
* @param int $uid mail user
* @return \Friendica\Object\Api\Mastodon\Status * @return \Friendica\Object\Api\Mastodon\Status
* @throws HTTPException\InternalServerErrorException * @throws HTTPException\InternalServerErrorException
* @throws \ImagickException * @throws \ImagickException
*/ */
public function createFromMailId(int $id, $uid) public function createFromMailId(int $id)
{ {
$item = ActivityPub\Transmitter::ItemArrayFromMail($id, true); $item = ActivityPub\Transmitter::ItemArrayFromMail($id, true);
if (empty($item)) { if (empty($item)) {

Wyświetl plik

@ -67,12 +67,12 @@ class Direct extends BaseApi
$params['order'] = ['id']; $params['order'] = ['id'];
} }
$mails = DBA::select('mail', ['id', 'uid'], $condition, $params); $mails = DBA::select('mail', ['id'], $condition, $params);
$statuses = []; $statuses = [];
while ($mail = DBA::fetch($mails)) { while ($mail = DBA::fetch($mails)) {
$statuses[] = DI::mstdnStatus()->createFromMailId($mail['id'], $mail['uid']); $statuses[] = DI::mstdnStatus()->createFromMailId($mail['id']);
} }
if (!empty($request['min_id'])) { if (!empty($request['min_id'])) {