Add Event Sources Logic (ActivityPub follows) #86
3 changed files with 11 additions and 11 deletions
|
@ -41,11 +41,6 @@ class Create {
|
|||
return;
|
||||
}
|
||||
|
||||
// Check that we are actually following this actor.
|
||||
if ( ! Event_Sources::actor_is_event_source( $activity['actor'] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if Activity is public or not.
|
||||
if ( ! is_activity_public( $activity ) ) {
|
||||
return;
|
||||
|
@ -56,6 +51,11 @@ class Create {
|
|||
return;
|
||||
}
|
||||
|
||||
// Check that we are actually following this actor.
|
||||
if ( ! Event_Sources::actor_is_event_source( $activity['actor'] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( Event_Sources::is_time_passed( $activity['object']['startTime'] ) ) {
|
||||
return new \WP_Error(
|
||||
'event_bridge_for_activitypub_not_accepting_events_from_the_past',
|
||||
|
|
|
@ -42,7 +42,7 @@ class Undo {
|
|||
return;
|
||||
}
|
||||
|
||||
// Check that we are actually following/or have a pending follow request this actor.
|
||||
// Check that we are actually following/or have a pending follow request for this actor.
|
||||
if ( ! Event_Sources::actor_is_event_source( $activity['actor'] ) ) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -41,11 +41,6 @@ class Update {
|
|||
return;
|
||||
}
|
||||
|
||||
// Check that we are actually following this actor.
|
||||
if ( ! Event_Sources::actor_is_event_source( $activity['actor'] ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if Activity is public or not.
|
||||
if ( ! is_activity_public( $activity ) ) {
|
||||
return;
|
||||
|
@ -56,6 +51,11 @@ class Update {
|
|||
return;
|
||||
}
|
||||
|
||||
// Check that we are actually following this actor.
|
||||
if ( ! Event_Sources::actor_is_event_source( $activity['actor'] ) ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( Event_Sources::is_time_passed( $activity['object']['startTime'] ) ) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue