--- a/ForgeChat/forgechat/model/chat.py
+++ b/ForgeChat/forgechat/model/chat.py
@@ -56,9 +56,17 @@
@property
def html_text(self):
text = '**%s** *%s* — %s' % (
- self.timestamp.strftime('%H:%M:%S'),
- self.sender.split('!')[0],
+ self.timestamp_hour,
+ self.sender_short,
self.text)
return g.markdown.convert(text)
+ @property
+ def sender_short(self):
+ return self.sender.split('!')[0]
+
+ @property
+ def timestamp_hour(self):
+ return self.timestamp.strftime('%H:%M:%S')
+
MappedClass.compile_all()