Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix small bugs in Toetem client.

Issues found by James O'Connor.
  • Loading branch information...
commit 9b0c6f33fa901292b830f3bbab1e95dcb9f2e173 1 parent d5aefdd
Jack Moffitt authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 ch11/toetem.js
8 ch11/toetem.js
View
@@ -64,7 +64,11 @@ var Toetem = {
});
});
} else if ($(message)
- .find('x > invite').attr('from') === Toetem.referee) {
+ .find('x > invite').attr('from') &&
+ Strophe.getBareJidFromJid($(message)
+ .find('x > invite')
+ .attr('from')) ===
+ Strophe.getBareJidFromJid(Toetem.referee)) {
Toetem.game = from;
Toetem.watching = false;
@@ -97,7 +101,7 @@ var Toetem = {
$('#messages').append(
"<div>&lt;<span class='" + nick_style + "'>" +
- Strophe.getBareJidFromJid(who) +
+ Strophe.getBareJidFromJid(from) +
"</span>&gt; " +
body + "</div>");
Please sign in to comment.
Something went wrong with that request. Please try again.