The reason why this was sending the reply before pushing the new nick to the users array is that this way I didn't have to filter the user's nick out of the received list of contacts on the front-end side (offering a user to call himself doesn't make sense).

I haven't searched very hard, but I didn't see any code in the front-end here that filters out the user's nick.