mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
doesntHave libraries is_public false
This commit is contained in:
@@ -36,13 +36,17 @@ class LibraryItemObserver
|
|||||||
// http://localhost/de/library/library-item?l=de&table[filters][id]=2
|
// http://localhost/de/library/library-item?l=de&table[filters][id]=2
|
||||||
|
|
||||||
if ($libraryItem->type !== 'markdown_article') {
|
if ($libraryItem->type !== 'markdown_article') {
|
||||||
|
|
||||||
|
if ($libraryItem->doesntHave('libraries', fn($query) => $query->where('is_public', false))
|
||||||
|
->exists()) {
|
||||||
$text = sprintf("Es gibt was Neues zum Lesen oder Anhören:\n\n%s\n\n%s\n\n#Bitcoin #Wissen #Einundzwanzig #gesundesgeld",
|
$text = sprintf("Es gibt was Neues zum Lesen oder Anhören:\n\n%s\n\n%s\n\n#Bitcoin #Wissen #Einundzwanzig #gesundesgeld",
|
||||||
$libraryItemName,
|
$libraryItemName,
|
||||||
url()->route('article.view',
|
url()->route('article.view',
|
||||||
['libraryItem' => $libraryItem->slug]),
|
['libraryItem' => $libraryItem->slug]),
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->postTweet($text);
|
$this->postTweet($text);
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$text = sprintf("Ein neuer News-Artikel wurde verfasst:\n\n%s\n\n%s\n\n#Bitcoin #News #Einundzwanzig #gesundesgeld",
|
$text = sprintf("Ein neuer News-Artikel wurde verfasst:\n\n%s\n\n%s\n\n#Bitcoin #News #Einundzwanzig #gesundesgeld",
|
||||||
$libraryItemName,
|
$libraryItemName,
|
||||||
|
|||||||
Reference in New Issue
Block a user