[PLUGIN][RepeatNote] Add support for onGSVerbToActivityStreamsTwoActivityType
This commit is contained in:
parent
8d1e000574
commit
630e22579e
|
@ -53,11 +53,11 @@ class RepeatNote extends NoteHandlerPlugin
|
|||
|
||||
if (!\is_null($repeat_entity)) {
|
||||
return DB::findBy('activity', [
|
||||
'actor_id' => $actor_id,
|
||||
'verb' => 'repeat',
|
||||
'object_type' => 'note',
|
||||
'object_id' => $note->getId(),
|
||||
], order_by: ['created' => 'dsc'])[0];
|
||||
'actor_id' => $actor_id,
|
||||
'verb' => 'repeat',
|
||||
'object_type' => 'note',
|
||||
'object_id' => $note->getId()
|
||||
], order_by: ['created' => 'DESC'])[0];
|
||||
}
|
||||
|
||||
// Create a new note with the same content as the original
|
||||
|
@ -337,4 +337,13 @@ class RepeatNote extends NoteHandlerPlugin
|
|||
{
|
||||
return $this->activitypub_handler($actor, $type_activity, $type_object, $ap_act);
|
||||
}
|
||||
|
||||
public function onGSVerbToActivityStreamsTwoActivityType(string $verb, ?string &$gs_verb_to_activity_stream_two_verb): bool
|
||||
{
|
||||
if ($verb === 'repeat') {
|
||||
$gs_verb_to_activity_stream_two_verb = 'Announce';
|
||||
return Event::stop;
|
||||
}
|
||||
return Event::next;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user