Sender now updates the currentMessageId so that the server doesn't treat the own senders message as new. Also reordered server code which could also have lead to a bug.