mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 02:48:00 +00:00
Add message.topic_name() helper function.
This little helper will facilitate adding a new Topic table in the future.
This commit is contained in:
@@ -780,6 +780,13 @@ class Message(ModelReprMixin, models.Model):
|
||||
has_image = models.BooleanField(default=False, db_index=True) # type: bool
|
||||
has_link = models.BooleanField(default=False, db_index=True) # type: bool
|
||||
|
||||
def topic_name(self):
|
||||
# type: () -> text_type
|
||||
"""
|
||||
Please start using this helper to facilitate an
|
||||
eventual switch over to a separate topic table.
|
||||
"""
|
||||
return self.subject
|
||||
|
||||
def __unicode__(self):
|
||||
# type: () -> text_type
|
||||
|
||||
Reference in New Issue
Block a user