Skip to content

Commit d2648f1

Browse files
committed
Only add cfp tags to toot when they exist
This makes sure that there is no single hash-sign in the toots when there is no tag in the CFP
1 parent 6aead6a commit d2648f1

File tree

13 files changed

+4
-779
lines changed

13 files changed

+4
-779
lines changed

src/Notification/MastodonNotifier.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ public function notify(Cfp $cfp)
4444
{
4545
$name = $this->shortenName($cfp->conferenceName);
4646
$uri = $this->shortenUri($cfp->uri);
47-
$tags = ' #' . implode(' #', $cfp->tags);
47+
$tags = '';
48+
if ($cfp->tags !== []) {
49+
$tags = ' #' . implode(' #', $cfp->tags);
50+
}
4851

4952
$notificationString = sprintf(
5053
<<<'NOTIFICATION'

src/Parser/Lanyrd/ClosingDate.php

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/Parser/Lanyrd/Description.php

Lines changed: 0 additions & 54 deletions
This file was deleted.

src/Parser/Lanyrd/Entry.php

Lines changed: 0 additions & 177 deletions
This file was deleted.

src/Parser/Lanyrd/EventEndDate.php

Lines changed: 0 additions & 52 deletions
This file was deleted.

src/Parser/Lanyrd/EventName.php

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)