Status gains 'text' property, at present a synonym of 'content'

status-serialisers
Marnanel Thurman 2020-07-14 21:10:21 +01:00
rodzic b4cce9fc0f
commit 5fa254d764
1 zmienionych plików z 8 dodań i 0 usunięć

Wyświetl plik

@ -277,3 +277,11 @@ class Status(models.Model):
@property
def is_reply(self):
return self.in_reply_to is not None
@property
def text(self):
# XXX It's possible that one of (text, content) is
# HTML and one is plain text. But the docs don't
# seem to be forthcoming on this point, so we'll
# just have to wait until we find out.
return self.content