mirror of
https://github.com/twisterarmy/cloud-server.git
synced 2025-09-10 21:02:13 +00:00
add feed by username support
This commit is contained in:
parent
5ad566b1d9
commit
c361ca0652
@ -8,8 +8,9 @@ $response = [
|
|||||||
|
|
||||||
if (isset($_SESSION['userName'])) {
|
if (isset($_SESSION['userName'])) {
|
||||||
|
|
||||||
if ($result = $_twister->getPosts($_twister->getFollowing($_SESSION['userName']),
|
$userNames = isset($_POST['userName']) && Filter::userName($_POST['userName']) ? [$_POST['userName']] : $_twister->getFollowing($_SESSION['userName']);
|
||||||
APPLICATION_MAX_POST_FEED)) {
|
|
||||||
|
if ($result = $_twister->getPosts($userNames, APPLICATION_MAX_POST_FEED)) {
|
||||||
|
|
||||||
$posts = [];
|
$posts = [];
|
||||||
foreach ($result as $post) {
|
foreach ($result as $post) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user