def update_local_friends(core, l):
 fullList = (core.memberList + core.mpList)
 for friend in l:
  if ('NickName' in friend):
   utils.emoji_formatter(friend, 'NickName')
  if ('DisplayName' in friend):
   utils.emoji_formatter(friend, 'DisplayName')
  oldInfoDict = utils.search_dict_list(fullList, 'UserName', friend['UserName'])
  if (oldInfoDict is None):
   oldInfoDict = copy.deepcopy(friend)
   if ((oldInfoDict['VerifyFlag'] & 8) == 0):
    core.memberList.append(oldInfoDict)
   else:
    core.mpList.append(oldInfoDict)
  else:
   update_info_dict(oldInfoDict, friend)

def update_local_friends ( core , l ) : fullList = ( core . memberList + core . mpList ) for friend in l : if ( 'NickName' in friend ) : utils . emoji_formatter ( friend , 'NickName' ) if ( 'DisplayName' in friend ) : utils . emoji_formatter ( friend , 'DisplayName' ) oldInfoDict = utils . search_dict_list ( fullList , 'UserName' , friend [ 'UserName' ] ) if ( oldInfoDict is None ) : oldInfoDict = copy . deepcopy ( friend ) if ( ( oldInfoDict [ 'VerifyFlag' ] & 8 ) == 0 ) : core . memberList . append ( oldInfoDict ) else : core . mpList . append ( oldInfoDict ) else : update_info_dict ( oldInfoDict , friend )
get a list of friends or mps for updating local contact .