Do not return an error when attepting a repeated follow.

This commit is contained in:
Diogo Cordeiro 2018-08-03 00:50:48 +01:00
parent 2b98344bc4
commit 1f77983891
2 changed files with 2 additions and 2 deletions

View File

@ -65,7 +65,7 @@ try {
} catch (AlreadyFulfilledException $e) {
// Notice URI already exists
common_debug('ActivityPub Inbox Create Note: Note already exists: '.$e->getMessage());
ActivityPubReturn::answer();
ActivityPubReturn::error('Note already exists.',202);
} catch (Exception $e) {
common_debug('ActivityPub Inbox Create Note: Failed Create Note: '.$e->getMessage());
ActivityPubReturn::error($e->getMessage());

View File

@ -61,5 +61,5 @@ if (!Subscription::exists($actor_profile, $object_profile)) {
ActivityPubReturn::answer();
} else {
common_debug('ActivityPubPlugin: Received a repeated Follow request from '.$data['actor'].' to '.$data['object']);
ActivityPubReturn::error('Already following.', 409);
ActivityPubReturn::error('Already following.', 202);
}