Skip to content

Commit

Permalink
Allow any number of words for room name
Browse files Browse the repository at this point in the history
  • Loading branch information
markusdosch committed Oct 27, 2021
1 parent 2068585 commit 25348a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ <h5 style="font-weight: normal; font-style: italic; margin-top: 1em">
autocapitalize="off"
id="room"
name="room"
pattern="\w+-\w+"
placeholder="two-words"
pattern="\w+(-\w+)*"
placeholder="words, separated by -"
value="tech-talk"
onclick="select()"
required
Expand Down
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ app.use(express.static("public"));

const livetexts = new Map<string, string>();

const dynamicNsp = io.of(/^\/\w+-\w+$/).on("connection", (socket) => {
const dynamicNsp = io.of(/^\/\w+(-\w+)*$/).on("connection", (socket) => {
const newNamespace = socket.nsp;

socket.emit("notice", { name: newNamespace.name });
Expand Down

0 comments on commit 25348a7

Please sign in to comment.