diff --git a/app/Http/Livewire/News/InternArticleView.php b/app/Http/Livewire/News/InternArticleView.php index d346b830..7095b3f4 100644 --- a/app/Http/Livewire/News/InternArticleView.php +++ b/app/Http/Livewire/News/InternArticleView.php @@ -33,9 +33,6 @@ class InternArticleView extends Component ->count() > 0 && !auth()->check()) { abort(403, __('Sorry! You are not authorized to perform this action.')); } - if ($this->libraryItem->sats && !auth()->check()) { - return to_route('article.overview'); - } if (auth()->check() && auth() ->user() ->paidArticles() @@ -77,10 +74,12 @@ class InternArticleView extends Component $invoice = $this->check($this->checkid ?? $this->checkThisPaymentHash, $this->libraryItem->createdBy->lnbits); if (isset($invoice['paid']) && $invoice['paid']) { $this->invoicePaid = true; - auth() - ->user() - ->paidArticles() - ->syncWithoutDetaching($this->libraryItem->id); + if (auth()->check()) { + auth() + ->user() + ->paidArticles() + ->syncWithoutDetaching($this->libraryItem->id); + } } else { Log::error(json_encode($invoice, JSON_THROW_ON_ERROR)); } diff --git a/resources/lang/de.json b/resources/lang/de.json index 98134a98..92cf5161 100644 --- a/resources/lang/de.json +++ b/resources/lang/de.json @@ -843,5 +843,6 @@ "paid": "zu bezahlen", "Setup LNBits for paid articles": "Setze LNBits für bezahlte Artikel ein", "Click QR-Code to open your wallet": "Klicke auf den QR-Code, um deine Wallet zu öffnen", - "LNBits settings are not valid!": "LNBits-Einstellungen sind nicht gültig!" + "LNBits settings are not valid!": "LNBits-Einstellungen sind nicht gültig!", + "As a guest, please save your payment hash so that you can unlock this article later. Unfortunately, we cannot save your purchase status permanently for guests. Please log in to use this feature.": "Bitte speichere als Gast deinen Payment Hash, damit du diesen Artikel später entsperren kannst. Leider können wir deinen Kaufstatus nicht dauerhaft speichern. Bitte melde dich an, um diese Funktion zu nutzen." } diff --git a/resources/views/livewire/news/article-overview.blade.php b/resources/views/livewire/news/article-overview.blade.php index 3e29f980..160c52b5 100644 --- a/resources/views/livewire/news/article-overview.blade.php +++ b/resources/views/livewire/news/article-overview.blade.php @@ -47,11 +47,6 @@ @foreach($libraryItems as $libraryItem) @if($libraryItem->approved || $libraryItem->created_by === auth()->id() || auth()->user()?->hasRole('news-editor')) - @php - if($libraryItem->sats && !auth()->check()) { - continue; - } - @endphp
{{ __('As a guest, please save your payment hash so that you can unlock this article later. Unfortunately, we cannot save your purchase status permanently for guests. Please log in to use this feature.') }}
+