From 8e123a49f48c5994e3c28a37c9dd86afbb317469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Mon, 16 Aug 2021 18:52:49 +0200 Subject: [PATCH] Support moments in thread tweet_id --- app/Models/Thread.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Models/Thread.php b/app/Models/Thread.php index f077cbc..926fb6f 100644 --- a/app/Models/Thread.php +++ b/app/Models/Thread.php @@ -55,7 +55,11 @@ class Thread extends Model public function getTweetUrlAttribute(): string { - return "https://twitter.com/{$this->author_username}/status/{$this->tweet_id}"; + if (is_numeric($this->tweet_id)) { + return "https://twitter.com/{$this->author_username}/status/{$this->tweet_id}"; + } + + return $this->tweet_id; } public function getKeyName()