ref
This commit is contained in:
@@ -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}'
|
||||
|
||||
Reference in New Issue
Block a user