Fix remote notices ids
This commit is contained in:
parent
ec49aee44b
commit
db3ce1e34a
@ -66,7 +66,7 @@ if (isset($data->object->inReplyTo)) {
|
|||||||
try {
|
try {
|
||||||
$inReplyTo = ActivityPubPlugin::get_local_notice_from_url($data->object->inReplyTo);
|
$inReplyTo = ActivityPubPlugin::get_local_notice_from_url($data->object->inReplyTo);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
ActivityPubReturn::error("Invalid Object inReplyTo value.");
|
ActivityPubReturn::error('Invalid Object inReplyTo value.');
|
||||||
}
|
}
|
||||||
$act->context->replyToID = $inReplyTo->getUri();
|
$act->context->replyToID = $inReplyTo->getUri();
|
||||||
$act->context->replyToUrl = $inReplyTo->getUrl();
|
$act->context->replyToUrl = $inReplyTo->getUrl();
|
||||||
@ -104,7 +104,7 @@ if (isset($data->object->cc) && is_array($data->object->cc)) {
|
|||||||
unset($discovery);
|
unset($discovery);
|
||||||
|
|
||||||
foreach ($to_profiles as $tp) {
|
foreach ($to_profiles as $tp) {
|
||||||
$act->context->attention[ActivityPubPlugin::actor_uri($tp)] = "http://activitystrea.ms/schema/1.0/person";
|
$act->context->attention[ActivityPubPlugin::actor_uri($tp)] = 'http://activitystrea.ms/schema/1.0/person';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add location if that is set
|
// Add location if that is set
|
||||||
@ -117,7 +117,7 @@ if (Notice::contentTooLong($content)) {
|
|||||||
ActivityPubReturn::error("That's too long. Maximum notice size is %d character.");
|
ActivityPubReturn::error("That's too long. Maximum notice size is %d character.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$options = array('source' => 'ActivityPub', 'uri' => isset($data->id) ? $data->id : $data->object->id, 'url' => $data->object->url);
|
$options = array('source' => 'ActivityPub', 'uri' => $data->object->id, 'url' => $data->object->url);
|
||||||
// $options gets filled with possible scoping settings
|
// $options gets filled with possible scoping settings
|
||||||
ToSelector::fillActivity($this, $act, $options);
|
ToSelector::fillActivity($this, $act, $options);
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ class Activitypub_explorer
|
|||||||
$aprofile->uri = $res['id'];
|
$aprofile->uri = $res['id'];
|
||||||
$aprofile->nickname = $res['preferredUsername'];
|
$aprofile->nickname = $res['preferredUsername'];
|
||||||
$aprofile->fullname = isset($res['name']) ? $res['name'] : null;
|
$aprofile->fullname = isset($res['name']) ? $res['name'] : null;
|
||||||
$aprofile->bio = isset($res['summary']) ? substr($res['summary'], 0, 1000) : null;
|
$aprofile->bio = isset($res['summary']) ? substr(strip_tags($res['summary']), 0, 1000) : null;
|
||||||
$aprofile->inboxuri = $res['inbox'];
|
$aprofile->inboxuri = $res['inbox'];
|
||||||
$aprofile->sharedInboxuri = isset($res['endpoints']['sharedInbox']) ? $res['endpoints']['sharedInbox'] : $res['inbox'];
|
$aprofile->sharedInboxuri = isset($res['endpoints']['sharedInbox']) ? $res['endpoints']['sharedInbox'] : $res['inbox'];
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user