update name

This commit is contained in:
j 2014-05-25 23:19:56 +02:00
parent c66573b752
commit 013598af22

View file

@ -50,10 +50,12 @@ def api_requestPeering(app, user_id, username, message):
if user.pending == 'sent': if user.pending == 'sent':
user.info['message'] = message user.info['message'] = message
user.update_peering(True, username) user.update_peering(True, username)
user.update_name()
else: else:
user.pending = 'received' user.pending = 'received'
user.info['username'] = username user.info['username'] = username
user.info['message'] = message user.info['message'] = message
user.update_name()
user.save() user.save()
trigger_event('peering.request', user.json()) trigger_event('peering.request', user.json())
return True return True
@ -69,6 +71,7 @@ def api_acceptPeering(app, user_id, username, message):
user.info = {} user.info = {}
user.info['username'] = username user.info['username'] = username
user.info['message'] = message user.info['message'] = message
user.update_name()
user.update_peering(True, username) user.update_peering(True, username)
state.nodes.queue('add', user.id) state.nodes.queue('add', user.id)
return True return True