get_message returns None when no message was found
This commit is contained in:
parent
bb2dadb862
commit
df72a3d9cf
1 changed files with 3 additions and 1 deletions
|
|
@ -81,7 +81,9 @@ class Room:
|
|||
id=mid
|
||||
)
|
||||
|
||||
if data:
|
||||
return Message.from_dict(data)
|
||||
# else: message does not exist
|
||||
|
||||
# The log returned is sorted from old to new
|
||||
async def log(self, n, before=None):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue