Skip to content

Commit

Permalink
Merge pull request scrollback#701 from scrollback/namefix
Browse files Browse the repository at this point in the history
Lower case name before creating room or user
  • Loading branch information
aravindet committed May 25, 2015
2 parents 489ddef + 98b0aa4 commit 31fa604
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ui/components/banner.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = function(core, config, store) {
if (roomName) {
core.emit("setstate", {
nav: {
room: roomName,
room: roomName.toLowerCase(),
mode: "room",
view: null,
thread: null
Expand Down
4 changes: 4 additions & 0 deletions ui/utils/create-entity.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ module.exports = function(core, config, store) {
}

if (res === "ok") {
name = name.toLowerCase();

room = store.get("nav", "room");
roomObj = store.getRoom(room);

Expand Down Expand Up @@ -86,6 +88,8 @@ module.exports = function(core, config, store) {
}

if (res === "ok") {
name = name.toLowerCase();

userObj = store.getUser();

if (!name || !userObj || !userObj.identities) {
Expand Down

0 comments on commit 31fa604

Please sign in to comment.