kopia lustrzana https://github.com/nextcloud/social
gotObject -> hasObject
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/678/head
rodzic
1f5df84796
commit
3b2942f3ee
|
@ -132,7 +132,7 @@ class NoteCreate extends Base {
|
|||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output) {
|
||||
|
||||
$userId = $input->getArgument('user_id');
|
||||
$userId = $input->getArgument('userid');
|
||||
$content = $input->getArgument('content');
|
||||
$to = $input->getOption('to');
|
||||
$hashtag = $input->getOption('hashtag');
|
||||
|
|
|
@ -60,7 +60,7 @@ class AcceptInterface implements IActivityPubInterface {
|
|||
* @param ACore $item
|
||||
*/
|
||||
public function processIncomingRequest(ACore $item) {
|
||||
if (!$item->gotObject()) {
|
||||
if (!$item->hasObject()) {
|
||||
return;
|
||||
}
|
||||
$object = $item->getObject();
|
||||
|
|
|
@ -60,7 +60,7 @@ class AddInterface implements IActivityPubInterface {
|
|||
* @param ACore $item
|
||||
*/
|
||||
public function processIncomingRequest(ACore $item) {
|
||||
if (!$item->gotObject()) {
|
||||
if (!$item->hasObject()) {
|
||||
return;
|
||||
}
|
||||
$object = $item->getObject();
|
||||
|
|
|
@ -60,7 +60,7 @@ class BlockInterface implements IActivityPubInterface {
|
|||
* @param ACore $item
|
||||
*/
|
||||
public function processIncomingRequest(ACore $item) {
|
||||
if (!$item->gotObject()) {
|
||||
if (!$item->hasObject()) {
|
||||
return;
|
||||
}
|
||||
$object = $item->getObject();
|
||||
|
|
|
@ -60,7 +60,7 @@ class CreateInterface implements IActivityPubInterface {
|
|||
* @param ACore $item
|
||||
*/
|
||||
public function processIncomingRequest(ACore $item) {
|
||||
if (!$item->gotObject()) {
|
||||
if (!$item->hasObject()) {
|
||||
return;
|
||||
}
|
||||
$object = $item->getObject();
|
||||
|
|
|
@ -64,7 +64,7 @@ class DeleteInterface implements IActivityPubInterface {
|
|||
public function processIncomingRequest(ACore $item) {
|
||||
$item->checkOrigin($item->getId());
|
||||
|
||||
if (!$item->gotObject()) {
|
||||
if (!$item->hasObject()) {
|
||||
|
||||
if ($item->getObjectId() !== '') {
|
||||
$item->checkOrigin($item->getObjectId());
|
||||
|
|
|
@ -60,7 +60,7 @@ class RejectInterface implements IActivityPubInterface {
|
|||
* @param ACore $item
|
||||
*/
|
||||
public function processIncomingRequest(ACore $item) {
|
||||
if (!$item->gotObject()) {
|
||||
if (!$item->hasObject()) {
|
||||
return;
|
||||
}
|
||||
$object = $item->getObject();
|
||||
|
|
|
@ -60,7 +60,7 @@ class RemoveInterface implements IActivityPubInterface {
|
|||
* @param ACore $item
|
||||
*/
|
||||
public function processIncomingRequest(ACore $item) {
|
||||
if (!$item->gotObject()) {
|
||||
if (!$item->hasObject()) {
|
||||
return;
|
||||
}
|
||||
$object = $item->getObject();
|
||||
|
|
|
@ -60,7 +60,7 @@ class UndoInterface implements IActivityPubInterface {
|
|||
* @param ACore $item
|
||||
*/
|
||||
public function processIncomingRequest(ACore $item) {
|
||||
if (!$item->gotObject()) {
|
||||
if (!$item->hasObject()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ class UpdateInterface implements IActivityPubInterface {
|
|||
* @param ACore $item
|
||||
*/
|
||||
public function processIncomingRequest(ACore $item) {
|
||||
if (!$item->gotObject()) {
|
||||
if (!$item->hasObject()) {
|
||||
return;
|
||||
}
|
||||
$object = $item->getObject();
|
||||
|
|
|
@ -144,7 +144,7 @@ class ACore extends Item implements JsonSerializable {
|
|||
/**
|
||||
* @return bool
|
||||
*/
|
||||
public function gotObject(): bool {
|
||||
public function hasObject(): bool {
|
||||
if ($this->object === null) {
|
||||
return false;
|
||||
}
|
||||
|
@ -677,7 +677,7 @@ class ACore extends Item implements JsonSerializable {
|
|||
$this->addEntry('published', $this->getPublished());
|
||||
$this->addEntryArray('tag', $this->getTags());
|
||||
|
||||
if ($this->gotObject()) {
|
||||
if ($this->hasObject()) {
|
||||
$this->addEntryItem('object', $this->getObject());
|
||||
} else {
|
||||
$this->addEntry('object', $this->getObjectId());
|
||||
|
|
|
@ -430,7 +430,7 @@ class ActivityService {
|
|||
private function saveActivity(ACore $activity) {
|
||||
// TODO: save activity in DB ?
|
||||
|
||||
if ($activity->gotObject()) {
|
||||
if ($activity->hasObject()) {
|
||||
$this->saveObject($activity->getObject());
|
||||
}
|
||||
}
|
||||
|
@ -441,7 +441,7 @@ class ActivityService {
|
|||
*/
|
||||
private function saveObject(ACore $activity) {
|
||||
try {
|
||||
if ($activity->gotObject()) {
|
||||
if ($activity->hasObject()) {
|
||||
$this->saveObject($activity->getObject());
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue