repo.or.cz
/
gitter.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Gitter migration: Setup redirects (rollout pt. 3)
[gitter.git]
/
modules
/
uri-resolver
/
lib
/
uri-context-as-browser-state.js
blob
f05a83a3a20d5c3d62f132e5e6ba7aecf9871f8b
1
'use strict'
;
2
3
function
uriContextAsBrowserState
(
uriContext
) {
4
if
(
uriContext
.
ownUrl
) {
5
return
{
6
uri
:
uriContext
.
uri
,
7
type
:
'home'
8
};
9
}
10
11
var
troupe
=
uriContext
.
troupe
;
12
if
(
troupe
) {
13
return
{
14
uri
:
uriContext
.
uri
,
15
type
:
'room'
,
16
roomId
:
troupe
.
id
17
};
18
}
19
20
var
group
=
uriContext
.
group
;
21
if
(
uriContext
.
group
) {
22
return
{
23
uri
:
uriContext
.
uri
,
24
type
:
'group'
,
25
groupId
:
group
.
id
26
};
27
}
28
}
29
30
module
.
exports
=
uriContextAsBrowserState
;