[PLUGINS][RepeatNote] Add onFilterNoteList event
Filters repeats out of Conversations, and replaces a repeat with the original Note on Actor feed Added isNoteRepeat to plugin's entity, which returns true if a given Note is a repeat of another Note
This commit is contained in:
@@ -76,6 +76,16 @@ class NoteRepeat extends Entity
|
||||
return $this->repeat_of;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param Note $note
|
||||
* @return bool Returns true if Note provided is a repeat of another Note
|
||||
*/
|
||||
public static function isNoteRepeat(Note $note): bool
|
||||
{
|
||||
return DB::count(self::class, ['note_id' => $note->getId()]) > 0;
|
||||
}
|
||||
|
||||
public static function getNoteRepeats(Note $note): array
|
||||
{
|
||||
return DB::dql(
|
||||
|
Reference in New Issue
Block a user