This commit is contained in:
Artem Tsyrulnikov
2025-12-16 15:13:33 +03:00
parent 18b30eaf7f
commit 23eb5ae13d
19 changed files with 115 additions and 126 deletions

View File

@@ -24,3 +24,9 @@ class Post(TimestampedModel):
class Meta:
table = 'post'
unique_together = (('channel_id', 'message_id'),)
@property
def url(self) -> str | None:
if not self.channel.username:
return None
return f'https://t.me/{self.channel.username}/{self.message_id}'