X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2FpageMinichat.js;h=aea8e2d273a3bece26d2f7e4b29668db7a6ee366;hp=30ca5a38af3add50f6afa43725a005809ee2f2fc;hb=4696f876c2a6e33619bf688138262fe9d85540f0;hpb=eb44db02bab9c8b082201aa153dea8229432e894 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),