Switch parameters
This commit is contained in:
parent
b46f18bdf9
commit
b6fcfebd56
22 changed files with 30 additions and 30 deletions
|
@ -65,6 +65,6 @@ class Bookmark extends BaseApi
|
|||
|
||||
Item::update(['starred' => true], ['id' => $item['id']]);
|
||||
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, true, true, self::appSupportsQuotes())->toArray());
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ class Context extends BaseApi
|
|||
$display_quotes = self::appSupportsQuotes();
|
||||
|
||||
foreach (array_slice($ancestors, 0, $request['limit']) as $ancestor) {
|
||||
$statuses['ancestors'][] = DI::mstdnStatus()->createFromUriId($ancestor, $uid, true, true, $display_quotes);;
|
||||
$statuses['ancestors'][] = DI::mstdnStatus()->createFromUriId($ancestor, $uid, $display_quotes);
|
||||
}
|
||||
|
||||
$descendants = self::getChildren($id, $children);
|
||||
|
@ -123,7 +123,7 @@ class Context extends BaseApi
|
|||
asort($descendants);
|
||||
|
||||
foreach (array_slice($descendants, 0, $request['limit']) as $descendant) {
|
||||
$statuses['descendants'][] = DI::mstdnStatus()->createFromUriId($descendant, $uid, true, true, $display_quotes);
|
||||
$statuses['descendants'][] = DI::mstdnStatus()->createFromUriId($descendant, $uid, $display_quotes);
|
||||
}
|
||||
|
||||
System::jsonExit($statuses);
|
||||
|
|
|
@ -49,6 +49,6 @@ class Favourite extends BaseApi
|
|||
|
||||
Item::performActivity($item['id'], 'like', $uid);
|
||||
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid,true, true, self::appSupportsQuotes())->toArray());
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,6 +53,6 @@ class Mute extends BaseApi
|
|||
|
||||
Post\ThreadUser::setIgnored($this->parameters['id'], $uid, true);
|
||||
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, true, true, self::appSupportsQuotes())->toArray());
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,6 +48,6 @@ class Pin extends BaseApi
|
|||
|
||||
Post\Collection::add($this->parameters['id'], Post\Collection::FEATURED, $item['author-id'], $uid);
|
||||
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, true, true, self::appSupportsQuotes())->toArray());
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,6 +58,6 @@ class Reblog extends BaseApi
|
|||
Item::performActivity($item['id'], 'announce', $uid);
|
||||
}
|
||||
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, true, true, self::appSupportsQuotes())->toArray());
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,6 +65,6 @@ class Unbookmark extends BaseApi
|
|||
|
||||
Item::update(['starred' => false], ['id' => $item['id']]);
|
||||
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, true, true, self::appSupportsQuotes())->toArray());
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,6 @@ class Unfavourite extends BaseApi
|
|||
|
||||
Item::performActivity($item['id'], 'unlike', $uid);
|
||||
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, true, true, self::appSupportsQuotes())->toArray());
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,6 +53,6 @@ class Unmute extends BaseApi
|
|||
|
||||
Post\ThreadUser::setIgnored($this->parameters['id'], $uid, false);
|
||||
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, true, true, self::appSupportsQuotes())->toArray());
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,6 +48,6 @@ class Unpin extends BaseApi
|
|||
|
||||
Post\Collection::remove($this->parameters['id'], Post\Collection::FEATURED, $uid);
|
||||
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, true, true, self::appSupportsQuotes())->toArray());
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,6 +64,6 @@ class Unreblog extends BaseApi
|
|||
Item::performActivity($item['id'], 'unannounce', $uid);
|
||||
}
|
||||
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, true, true, self::appSupportsQuotes())->toArray());
|
||||
System::jsonExit(DI::mstdnStatus()->createFromUriId($this->parameters['id'], $uid, self::appSupportsQuotes())->toArray());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue