X-Git-Url: http://git.euphorik.ch/?a=blobdiff_plain;f=js%2FpageMinichat.js;h=aea8e2d273a3bece26d2f7e4b29668db7a6ee366;hb=5817e1d48314a933ee497cce7281320dc1a4cc26;hp=30ca5a38af3add50f6afa43725a005809ee2f2fc;hpb=eb44db02bab9c8b082201aa153dea8229432e894;p=euphorik.git diff --git a/js/pageMinichat.js b/js/pageMinichat.js index 30ca5a3..aea8e2d 100755 --- a/js/pageMinichat.js +++ b/js/pageMinichat.js @@ -19,7 +19,7 @@ /*jslint laxbreak:true */ euphorik.PageMinichat = function(client, formater, util, communication) { - this.nom = "minichat"; + this.name = "minichat"; this.client = client; this.formater = formater; @@ -229,7 +229,7 @@ euphorik.PageMinichat.prototype.envoyerMessage = function(message) { var nick = $("form#posterMessage input.nick").val(); // (un nick vide est autorisé) - nick = this.formater.filtrerInputPseudo(nick); + nick = this.formater.formatNick(nick); if (nick === euphorik.conf.defaultNick) { this.util.messageDialog("Le nick ne peut pas être " + euphorik.conf.defaultNick); @@ -242,8 +242,6 @@ euphorik.PageMinichat.prototype.envoyerMessage = function(message) { return; } - this.client.nick = nick; - if (!this.client.authentifie()) { if (!this.client.enregistrement()) { this.util.messageDialog("login impossible"); @@ -258,6 +256,8 @@ euphorik.PageMinichat.prototype.envoyerMessage = function(message) { } this.envoieMessageEnCours = true; + this.client.nick = nick; + this.communication.requete( "put_message", this.getJSONMessage(nick, message),