nostr events added

This commit is contained in:
HolgerHatGarKeineNode
2023-02-24 11:13:43 +01:00
parent 5fbef7d4aa
commit 235ce774f9
10 changed files with 119 additions and 105 deletions

View File

@@ -17,18 +17,11 @@ class MeetupEventObserver
public function created(MeetupEvent $meetupEvent): void
{
try {
$meetupName = $meetupEvent->meetup->name;
$from = $meetupEvent->meetup->name;
if ($meetupEvent->meetup->nostr) {
$meetupName .= ' @'.$meetupEvent->meetup->nostr;
$from .= ' @'.$meetupEvent->meetup->nostr;
}
$text = sprintf("%s hat einen neuen Termin eingestellt:\n\n%s\n\n%s\n\n%s\n\n#Bitcoin #Meetup #Einundzwanzig #gesundesgeld",
$meetupName,
$meetupEvent->start->asDateTime(),
$meetupEvent->location,
url()->route('meetup.event.landing',
['country' => 'de', 'meetupEvent' => $meetupEvent->id]),
);
$this->publishOnNostr($meetupEvent, $text);
$this->publishOnNostr($meetupEvent, $this->getText('MeetupEvent', $from));
} catch (Exception $e) {
Log::error($e->getMessage());
}