Compare commits

...

2 Commits
v1 ... v1.7.2

Author SHA1 Message Date
Lonami Exo
44987f9c39 Fix Conversation not allowing getting responses after ID 0 2019-04-29 08:53:42 +02:00
Lonami Exo
81d7bc223e Fix using events.Raw after 1b6b4a5 2019-04-29 08:51:02 +02:00
3 changed files with 5 additions and 5 deletions

View File

@ -323,7 +323,7 @@ class UpdateMethods(UserMethods):
# `await` for `check_entities_and_get_difference` causes
# unnecessary work. So we need to call a function that
# doesn't cause a task switch.
if not event._load_entities():
if isinstance(event, EventCommon) and not event._load_entities():
await event._get_difference(channel_id, pts_date)
await callback(event)

View File

@ -4,7 +4,7 @@ import time
from .chatgetter import ChatGetter
from ... import helpers, utils, errors
from ...events.common import EventCommon
# Sometimes the edits arrive very fast (within the same second).
# In that case we add a small delta so that the age is older, for
@ -298,7 +298,7 @@ class Conversation(ChatGetter):
for i, (ev, fut) in self._custom.items():
ev_type = type(ev)
if built[ev_type] and ev.filter(built[ev_type]):
if not ev._load_entities():
if isinstance(ev, EventCommon) and not ev._load_entities():
await ev._get_difference(channel_id, pts_date)
fut.set_result(built[ev_type])
@ -369,7 +369,7 @@ class Conversation(ChatGetter):
del self._pending_reads[to_remove]
def _get_message_id(self, message):
if message:
if message is not None: # 0 is valid but false-y, check for None
return message if isinstance(message, int) else message.id
elif self._last_outgoing:
return self._last_outgoing

View File

@ -1,3 +1,3 @@
# Versions should comply with PEP440.
# This line is parsed in setup.py:
__version__ = '1.7.1'
__version__ = '1.7.2'