mirror of https://github.com/bra1n/townsquare.git
Merge pull request #108 from davotronic5000/#94_parse_link_when_joining
#94 parse link when joining
This commit is contained in:
commit
43070ae1d3
|
@ -255,9 +255,12 @@ export default {
|
|||
},
|
||||
joinSession() {
|
||||
if (this.session.sessionId) return this.leaveSession();
|
||||
const sessionId = prompt(
|
||||
let sessionId = prompt(
|
||||
"Enter the channel number / name of the session you want to join"
|
||||
);
|
||||
if (sessionId.match(/^https?:\/\//i)) {
|
||||
sessionId = sessionId.split("#").pop();
|
||||
}
|
||||
if (sessionId) {
|
||||
this.$store.commit("session/clearVoteHistory");
|
||||
this.$store.commit("session/setSpectator", true);
|
||||
|
|
Loading…
Reference in New Issue