Skip to content

Commit

Permalink
fix: byobu discussions open up while using this extension
Browse files Browse the repository at this point in the history
  • Loading branch information
luceos committed Jun 12, 2024
1 parent 82e6ec7 commit a9dc8bf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/Seeders/CommentSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,14 @@ public function toDocument(Model $model): Document
}

if ($this->extensionEnabled('fof-byobu')) {
$document['recipient_users'] = $model->discussion->recipientUsers->pluck('id')->toArray();
$document['recipient_groups'] = $model->discussion->recipientGroups->pluck('id')->toArray();
$document['recipient_users'] = $model->discussion->recipientUsers
->whereNull('removed_at')
->pluck('id')
->toArray();
$document['recipient_groups'] = $model->discussion->recipientGroups
->whereNull('removed_at')
->pluck('id')
->toArray();
}

return $document;
Expand Down
10 changes: 8 additions & 2 deletions src/Seeders/DiscussionSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,14 @@ public function toDocument(Model $model): Document
}

if ($this->extensionEnabled('fof-byobu')) {
$document['recipient_users'] = $model->recipientUsers->pluck('id')->toArray();
$document['recipient_groups'] = $model->recipientGroups->pluck('id')->toArray();
$document['recipient_users'] = $model->recipientUsers
->whereNull('removed_at')
->pluck('id')
->toArray();
$document['recipient_groups'] = $model->recipientGroups
->whereNull('removed_at')
->pluck('id')
->toArray();
}

if ($this->extensionEnabled('flarum-sticky')) {
Expand Down

0 comments on commit a9dc8bf

Please sign in to comment.