better profile parsing

This commit is contained in:
Romain Bignon 2014-05-18 15:11:35 +02:00
commit 54d9efd05a
2 changed files with 13 additions and 22 deletions

View file

@ -286,7 +286,7 @@ class OkCBackend(BaseBackend, ICapMessages, ICapContact, ICapMessagesPost, ICapD
contact = Contact(_id, profile['id'], Contact.STATUS_OFFLINE)
contact.url = 'http://%s/profile/%s' % (self.browser.DOMAIN, _id)
contact.profile = profile['data']
contact.summary = profile['summary']
contact.summary = profile.get('summary', '')
if contact.profile['details']['last_online'].value == u'Online now!':
contact.status = Contact.STATUS_ONLINE