Add ratism to chatbox

This commit is contained in:
cuom1999 2020-05-23 18:52:19 -05:00
parent ca89510799
commit acec52f71b
2 changed files with 15 additions and 10 deletions

View file

@ -14,10 +14,11 @@ import json
def format_messages(messages):
msg_list = [{
'time': msg.time,
'author': str(msg.author),
'author': msg.author,
'body': msg.body,
'image': gravatar(msg.author, 32),
'id': msg.id
'id': msg.id,
'css_class': msg.author.css_class,
} for msg in messages]
return json.dumps(msg_list, default=str)