def handle_webchallenges(self, msg, body): challenge_info = msim_util.obj_list_from_msdict(body) self.api.got_webchallenge_info(challenge_info)
def handle_group_list(self, msg, body): groups = msim_util.obj_list_from_msdict(body) for group in groups: self.api.got_group(group) self.api.got_groups(groups)
def handle_im_buddylist(self, msg, body): ''' list of buddies ''' buddies = msim_util.obj_list_from_msdict(body) log.info('got %r buddies!', len(buddies)) for i, buddy in enumerate(buddies): id = buddy.get('ContactID', buddy.get('UserID')) if id is None: log.error('This info has no ID! %r', buddy) log.info('buddy #%r skipped (info = %r)', i, buddy) continue self.api.got_buddy(id, buddy) self.api.got_buddies(buddies)