only update name if name changes

This commit is contained in:
j 2016-01-25 23:02:27 +05:30
parent 2b3edd40dc
commit afbb4e638f

View file

@ -142,9 +142,10 @@ class LocalNodesBase(Thread):
with db.session(): with db.session():
u = user.models.User.get(data['id']) u = user.models.User.get(data['id'])
if u: if u:
if u.info['username'] != data['username']:
u.info['username'] = data['username'] u.info['username'] = data['username']
u.info['local'] = data
u.update_name() u.update_name()
u.info['local'] = data
u.save() u.save()
state.nodes.queue('add', u.id) state.nodes.queue('add', u.id)
self.send() self.send()