Merge pull request #169 from OMGWINNING/master

Handle empty participant_customizations field
This commit is contained in:
Mads Marquart
2017-06-28 10:23:33 +02:00
committed by GitHub
2 changed files with 1 additions and 1 deletions

0
__init__.py Normal file
View File

View File

@@ -44,7 +44,7 @@ def get_customization_info(thread):
rtn['nicknames'] = {}
for k in info['participant_customizations']:
rtn['nicknames'][k['participant_id']] = k.get('nickname')
else:
elif info.get('participant_customizations'):
_id = thread.get('thread_key', {}).get('other_user_id') or thread.get('id')
if info['participant_customizations'][0]['participant_id'] == _id:
rtn['nickname'] = info['participant_customizations'][0]