$libraryItemName .= ' von '.$libraryItem->lecturer->name;

This commit is contained in:
Benjamin Takats
2023-01-27 14:10:50 +01:00
parent b371f849f7
commit 2b46013f20
3 changed files with 312 additions and 309 deletions

View File

@@ -26,7 +26,7 @@ class LibraryItemObserver
if ($libraryItem->lecturer->twitter_username && $libraryItem->type !== 'markdown_article') {
$libraryItemName .= ' von @'.$libraryItem->lecturer->twitter_username;
}
if ($libraryItem->lecturer->twitter_username && $libraryItem->type === 'markdown_article') {
if (!$libraryItem->lecturer->twitter_username) {
$libraryItemName .= ' von '.$libraryItem->lecturer->name;
}
@@ -37,7 +37,8 @@ class LibraryItemObserver
if ($libraryItem->type !== 'markdown_article') {
if ($libraryItem->whereDoesntHave('libraries', fn($query) => $query->where('libraries.is_public', false))
if ($libraryItem->whereDoesntHave('libraries',
fn($query) => $query->where('libraries.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",
$libraryItemName,

614
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -14,7 +14,7 @@ ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update \
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 \
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 vim \
&& mkdir -p ~/.gnupg \
&& chmod 600 ~/.gnupg \
&& echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf \