Another renamed function
This commit is contained in:
parent
8841519c0d
commit
78a7e130ae
2 changed files with 3 additions and 3 deletions
|
@ -53,7 +53,7 @@ function profile_init(App $a)
|
||||||
if (ActivityPub::isRequest()) {
|
if (ActivityPub::isRequest()) {
|
||||||
$user = DBA::selectFirst('user', ['uid'], ['nickname' => $which]);
|
$user = DBA::selectFirst('user', ['uid'], ['nickname' => $which]);
|
||||||
if (DBA::isResult($user)) {
|
if (DBA::isResult($user)) {
|
||||||
$data = ActivityPub\Transmitter::profile($user['uid']);
|
$data = ActivityPub\Transmitter::getProfile($user['uid']);
|
||||||
echo json_encode($data);
|
echo json_encode($data);
|
||||||
header('Content-Type: application/activity+json');
|
header('Content-Type: application/activity+json');
|
||||||
exit();
|
exit();
|
||||||
|
|
|
@ -187,7 +187,7 @@ class Transmitter
|
||||||
* @param integer $uid User ID
|
* @param integer $uid User ID
|
||||||
* @return profile array
|
* @return profile array
|
||||||
*/
|
*/
|
||||||
public static function profile($uid)
|
public static function getProfile($uid)
|
||||||
{
|
{
|
||||||
$condition = ['uid' => $uid, 'blocked' => false, 'account_expired' => false,
|
$condition = ['uid' => $uid, 'blocked' => false, 'account_expired' => false,
|
||||||
'account_removed' => false, 'verified' => true];
|
'account_removed' => false, 'verified' => true];
|
||||||
|
@ -722,7 +722,7 @@ class Transmitter
|
||||||
'id' => System::baseUrl() . '/activity/' . System::createGUID(),
|
'id' => System::baseUrl() . '/activity/' . System::createGUID(),
|
||||||
'type' => 'Update',
|
'type' => 'Update',
|
||||||
'actor' => $owner['url'],
|
'actor' => $owner['url'],
|
||||||
'object' => self::profile($uid),
|
'object' => self::getProfile($uid),
|
||||||
'published' => DateTimeFormat::utcNow(DateTimeFormat::ATOM),
|
'published' => DateTimeFormat::utcNow(DateTimeFormat::ATOM),
|
||||||
'to' => [$profile['followers']],
|
'to' => [$profile['followers']],
|
||||||
'cc' => []];
|
'cc' => []];
|
||||||
|
|
Loading…
Reference in a new issue