nostr events schedule

This commit is contained in:
HolgerHatGarKeineNode
2023-02-24 11:54:19 +01:00
parent c99ebca063
commit d483c0955a
7 changed files with 75 additions and 17 deletions

View File

@@ -20,14 +20,11 @@ class LibraryItemObserver
try {
$libraryItem->setStatus('published');
$from = $libraryItem->name;
$from .= ' von '.$libraryItem->lecturer->name;
if ($libraryItem->type !== LibraryItemType::MarkdownArticle()) {
if ($libraryItem->whereDoesntHave('libraries',
fn($query) => $query->where('libraries.is_public', false))
->exists()) {
$this->publishOnNostr($libraryItem, $this->getText('LibraryItem', $from));
$this->publishOnNostr($libraryItem, $this->getText('LibraryItem'));
}
}
} catch (Exception $e) {