Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
galene
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
galene
Commits
bc7bd36b
Commit
bc7bd36b
authored
Aug 12, 2020
by
Juliusz Chroboczek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restructure user notifications.
parent
b6adc0b9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
static/sfu.js
static/sfu.js
+12
-5
webclient.go
webclient.go
+5
-2
No files found.
static/sfu.js
View file @
bc7bd36b
...
...
@@ -678,7 +678,7 @@ function serverConnect() {
gotPermissions
(
m
.
permissions
);
break
;
case
'
user
'
:
gotUser
(
m
.
id
,
m
.
username
,
m
.
del
);
gotUser
(
m
.
id
,
m
.
kind
,
m
.
username
);
break
;
case
'
chat
'
:
addToChatbox
(
m
.
id
,
m
.
username
,
m
.
kind
,
m
.
value
);
...
...
@@ -900,11 +900,18 @@ function resetUsers() {
delUser
(
id
,
users
[
id
]);
}
function
gotUser
(
id
,
name
,
del
)
{
if
(
del
)
delUser
(
id
,
name
);
else
function
gotUser
(
id
,
kind
,
name
)
{
switch
(
kind
)
{
case
'
add
'
:
addUser
(
id
,
name
);
break
;
case
'
delete
'
:
delUser
(
id
,
name
);
break
;
default
:
console
.
warn
(
'
Unknown user kind
'
,
kind
);
break
;
}
}
function
displayUsername
()
{
...
...
webclient.go
View file @
bc7bd36b
...
...
@@ -112,11 +112,15 @@ func (c *webClient) Credentials() clientCredentials {
}
func
(
c
*
webClient
)
pushClient
(
id
,
username
string
,
add
bool
)
error
{
kind
:=
"add"
if
!
add
{
kind
=
"delete"
}
return
c
.
write
(
clientMessage
{
Type
:
"user"
,
Kind
:
kind
,
Id
:
id
,
Username
:
username
,
Del
:
!
add
,
})
}
...
...
@@ -181,7 +185,6 @@ type clientMessage struct {
Candidate
*
webrtc
.
ICECandidateInit
`json:"candidate,omitempty"`
Renegotiate
bool
`json:"renegotiate,omitempty"`
Labels
map
[
string
]
string
`json:"labels,omitempty"`
Del
bool
`json:"del,omitempty"`
Request
rateMap
`json:"request,omitempty"`
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment