mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
nostr events schedule
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -17,11 +17,7 @@ class MeetupEventObserver
|
||||
public function created(MeetupEvent $meetupEvent): void
|
||||
{
|
||||
try {
|
||||
$from = $meetupEvent->meetup->name;
|
||||
if ($meetupEvent->meetup->nostr) {
|
||||
$from .= ' @'.$meetupEvent->meetup->nostr;
|
||||
}
|
||||
$this->publishOnNostr($meetupEvent, $this->getText('MeetupEvent', $from));
|
||||
$this->publishOnNostr($meetupEvent, $this->getText('MeetupEvent'));
|
||||
} catch (Exception $e) {
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
|
||||
@@ -17,11 +17,7 @@ class MeetupObserver
|
||||
public function created(Meetup $meetup): void
|
||||
{
|
||||
try {
|
||||
$from = $meetup->name;
|
||||
if ($meetup->nostr) {
|
||||
$from .= ' @'.$meetup->nostr;
|
||||
}
|
||||
$this->publishOnNostr($meetup, $this->getText('Meetup', $from));
|
||||
$this->publishOnNostr($meetup, $this->getText('Meetup'));
|
||||
} catch (Exception $e) {
|
||||
Log::error($e->getMessage());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user