Skip to content

Commit

Permalink
Fix group dm issues (#14)
Browse files Browse the repository at this point in the history
Apply lazy user loading fix to group dms. Bump version by 1.
  • Loading branch information
dolfies authored May 18, 2021
1 parent 1d34afe commit 70bbe31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions discord/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
__author__ = 'Rapptz'
__license__ = 'MIT'
__copyright__ = 'Copyright 2015-present Rapptz'
__version__ = '1.7.6'
__version__ = '1.7.7'

__path__ = __import__('pkgutil').extend_path(__path__, __name__)

Expand Down Expand Up @@ -62,6 +62,6 @@

VersionInfo = namedtuple('VersionInfo', 'major minor micro releaselevel serial')

version_info = VersionInfo(major=1, minor=7, micro=6, releaselevel='final', serial=0)
version_info = VersionInfo(major=1, minor=7, micro=7, releaselevel='final', serial=0)

logging.getLogger(__name__).addHandler(logging.NullHandler())
5 changes: 4 additions & 1 deletion discord/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,10 @@ def _update_group(self, data):
self.name = data.get('name')

try:
self.recipients = [self._state.store_user(u) for u in data['recipients']]
if 'recipients' in data:
self.recipients = [self._state.store_user(u) for u in data['recipients']]
else:
self.recipients = [self._state.store_lazy_user(u) for u in data['recipient_ids']]
except KeyError:
pass

Expand Down

0 comments on commit 70bbe31

Please sign in to comment.