Fix chat last message body
This commit is contained in:
parent
ff6988f29c
commit
f75c2a391f
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ class Room(models.Model):
|
||||||
|
|
||||||
@cache_wrapper(prefix="Rinfo")
|
@cache_wrapper(prefix="Rinfo")
|
||||||
def _info(self):
|
def _info(self):
|
||||||
last_msg = self.message_set.first()
|
last_msg = self.message_set.filter(hidden=False).first()
|
||||||
return {
|
return {
|
||||||
"user_ids": [self.user_one.id, self.user_two.id],
|
"user_ids": [self.user_one.id, self.user_two.id],
|
||||||
"last_message": last_msg.body if last_msg else None,
|
"last_message": last_msg.body if last_msg else None,
|
||||||
|
|
Loading…
Reference in a new issue