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
Alain Takoudjou
galene
Commits
f5de94cf
Commit
f5de94cf
authored
Dec 14, 2020
by
Antonin Décimo
Committed by
Juliusz Chroboczek
Dec 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correct spelling of privileged.
parent
a939ec07
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
16 deletions
+16
-16
rtpconn/webclient.go
rtpconn/webclient.go
+5
-5
static/galene.js
static/galene.js
+6
-6
static/protocol.js
static/protocol.js
+5
-5
No files found.
rtpconn/webclient.go
View file @
f5de94cf
...
@@ -32,7 +32,7 @@ func errorToWSCloseMessage(id string, err error) (*clientMessage, []byte) {
...
@@ -32,7 +32,7 @@ func errorToWSCloseMessage(id string, err error) (*clientMessage, []byte) {
Type
:
"usermessage"
,
Type
:
"usermessage"
,
Kind
:
"error"
,
Kind
:
"error"
,
Dest
:
id
,
Dest
:
id
,
Privile
dged
:
true
,
Privile
ged
:
true
,
Value
:
&
s
,
Value
:
&
s
,
}
}
text
=
e
.
Error
()
text
=
e
.
Error
()
...
@@ -168,7 +168,7 @@ type clientMessage struct {
...
@@ -168,7 +168,7 @@ type clientMessage struct {
Dest
string
`json:"dest,omitempty"`
Dest
string
`json:"dest,omitempty"`
Username
string
`json:"username,omitempty"`
Username
string
`json:"username,omitempty"`
Password
string
`json:"password,omitempty"`
Password
string
`json:"password,omitempty"`
Privile
dged
bool
`json:"priviled
ged,omitempty"`
Privile
ged
bool
`json:"privile
ged,omitempty"`
Permissions
*
group
.
ClientPermissions
`json:"permissions,omitempty"`
Permissions
*
group
.
ClientPermissions
`json:"permissions,omitempty"`
Group
string
`json:"group,omitempty"`
Group
string
`json:"group,omitempty"`
Value
*
string
`json:"value,omitempty"`
Value
*
string
`json:"value,omitempty"`
...
@@ -1181,7 +1181,7 @@ func handleClientMessage(c *webClient, m clientMessage) error {
...
@@ -1181,7 +1181,7 @@ func handleClientMessage(c *webClient, m clientMessage) error {
Id
:
m
.
Id
,
Id
:
m
.
Id
,
Dest
:
m
.
Dest
,
Dest
:
m
.
Dest
,
Username
:
m
.
Username
,
Username
:
m
.
Username
,
Privile
dged
:
c
.
permissions
.
Op
,
Privile
ged
:
c
.
permissions
.
Op
,
Time
:
tm
,
Time
:
tm
,
Kind
:
m
.
Kind
,
Kind
:
m
.
Kind
,
Value
:
m
.
Value
,
Value
:
m
.
Value
,
...
@@ -1430,7 +1430,7 @@ func errorMessage(id string, err error) *clientMessage {
...
@@ -1430,7 +1430,7 @@ func errorMessage(id string, err error) *clientMessage {
Type
:
"usermessage"
,
Type
:
"usermessage"
,
Kind
:
"error"
,
Kind
:
"error"
,
Dest
:
id
,
Dest
:
id
,
Privile
dged
:
true
,
Privile
ged
:
true
,
Value
:
&
message
,
Value
:
&
message
,
}
}
case
group
.
KickError
:
case
group
.
KickError
:
...
@@ -1444,7 +1444,7 @@ func errorMessage(id string, err error) *clientMessage {
...
@@ -1444,7 +1444,7 @@ func errorMessage(id string, err error) *clientMessage {
Id
:
e
.
Id
,
Id
:
e
.
Id
,
Username
:
e
.
Username
,
Username
:
e
.
Username
,
Dest
:
id
,
Dest
:
id
,
Privile
dged
:
true
,
Privile
ged
:
true
,
Value
:
&
message
,
Value
:
&
message
,
}
}
default
:
default
:
...
...
static/galene.js
View file @
f5de94cf
...
@@ -1587,7 +1587,7 @@ let lastMessage = {};
...
@@ -1587,7 +1587,7 @@ let lastMessage = {};
* @param {string} kind
* @param {string} kind
* @param {string} message
* @param {string} message
*/
*/
function
addToChatbox
(
peerId
,
dest
,
nick
,
time
,
privile
d
ged
,
kind
,
message
)
{
function
addToChatbox
(
peerId
,
dest
,
nick
,
time
,
privileged
,
kind
,
message
)
{
let
userpass
=
getUserPass
();
let
userpass
=
getUserPass
();
let
row
=
document
.
createElement
(
'
div
'
);
let
row
=
document
.
createElement
(
'
div
'
);
row
.
classList
.
add
(
'
message-row
'
);
row
.
classList
.
add
(
'
message-row
'
);
...
@@ -2263,25 +2263,25 @@ async function serverConnect() {
...
@@ -2263,25 +2263,25 @@ async function serverConnect() {
serverConnection
.
onjoined
=
gotJoined
;
serverConnection
.
onjoined
=
gotJoined
;
serverConnection
.
onchat
=
addToChatbox
;
serverConnection
.
onchat
=
addToChatbox
;
serverConnection
.
onclearchat
=
clearChat
;
serverConnection
.
onclearchat
=
clearChat
;
serverConnection
.
onusermessage
=
function
(
id
,
dest
,
username
,
time
,
privile
d
ged
,
kind
,
message
)
{
serverConnection
.
onusermessage
=
function
(
id
,
dest
,
username
,
time
,
privileged
,
kind
,
message
)
{
switch
(
kind
)
{
switch
(
kind
)
{
case
'
error
'
:
case
'
error
'
:
case
'
warning
'
:
case
'
warning
'
:
case
'
info
'
:
case
'
info
'
:
let
from
=
id
?
(
username
||
'
Anonymous
'
)
:
'
The Server
'
;
let
from
=
id
?
(
username
||
'
Anonymous
'
)
:
'
The Server
'
;
if
(
privile
d
ged
)
if
(
privileged
)
displayError
(
`
${
from
}
said:
${
message
}
`
,
kind
);
displayError
(
`
${
from
}
said:
${
message
}
`
,
kind
);
else
else
console
.
error
(
`Got unprivile
d
ged message of kind
${
kind
}
`
);
console
.
error
(
`Got unprivileged message of kind
${
kind
}
`
);
break
;
break
;
case
'
mute
'
:
case
'
mute
'
:
console
.
log
(
id
,
dest
,
username
);
console
.
log
(
id
,
dest
,
username
);
if
(
privile
d
ged
)
{
if
(
privileged
)
{
setLocalMute
(
true
,
true
);
setLocalMute
(
true
,
true
);
let
by
=
username
?
'
by
'
+
username
:
''
;
let
by
=
username
?
'
by
'
+
username
:
''
;
displayWarning
(
`You have been muted
${
by
}
`
);
displayWarning
(
`You have been muted
${
by
}
`
);
}
else
{
}
else
{
console
.
error
(
`Got unprivile
d
ged message of kind
${
kind
}
`
);
console
.
error
(
`Got unprivileged message of kind
${
kind
}
`
);
}
}
break
;
break
;
default
:
default
:
...
...
static/protocol.js
View file @
f5de94cf
...
@@ -127,7 +127,7 @@ function ServerConnection() {
...
@@ -127,7 +127,7 @@ function ServerConnection() {
/**
/**
* onchat is called whenever a new chat message is received.
* onchat is called whenever a new chat message is received.
*
*
* @type {(this: ServerConnection, id: string, dest: string, username: string, time: number, privile
d
ged: boolean, kind: string, message: string) => void}
* @type {(this: ServerConnection, id: string, dest: string, username: string, time: number, privileged: boolean, kind: string, message: string) => void}
*/
*/
this
.
onchat
=
null
;
this
.
onchat
=
null
;
/**
/**
...
@@ -136,10 +136,10 @@ function ServerConnection() {
...
@@ -136,10 +136,10 @@ function ServerConnection() {
* a user-id otherwise.
* a user-id otherwise.
*
*
* 'kind' is typically one of 'error', 'warning', 'info' or 'mute'. If
* 'kind' is typically one of 'error', 'warning', 'info' or 'mute'. If
* 'id' is non-null, 'privile
d
ged' indicates whether the message was
* 'id' is non-null, 'privileged' indicates whether the message was
* sent by an operator.
* sent by an operator.
*
*
* @type {(this: ServerConnection, id: string, dest: string, username: string, time: number, privile
d
ged: boolean, kind: string, message: string) => void}
* @type {(this: ServerConnection, id: string, dest: string, username: string, time: number, privileged: boolean, kind: string, message: string) => void}
*/
*/
this
.
onusermessage
=
null
;
this
.
onusermessage
=
null
;
/**
/**
...
@@ -159,7 +159,7 @@ function ServerConnection() {
...
@@ -159,7 +159,7 @@ function ServerConnection() {
* @property {string} [dest]
* @property {string} [dest]
* @property {string} [username]
* @property {string} [username]
* @property {string} [password]
* @property {string} [password]
* @property {boolean} [privile
d
ged]
* @property {boolean} [privileged]
* @property {Object<string,boolean>} [permissions]
* @property {Object<string,boolean>} [permissions]
* @property {string} [group]
* @property {string} [group]
* @property {string} [value]
* @property {string} [value]
...
@@ -317,7 +317,7 @@ ServerConnection.prototype.connect = async function(url) {
...
@@ -317,7 +317,7 @@ ServerConnection.prototype.connect = async function(url) {
if
(
sc
.
onusermessage
)
if
(
sc
.
onusermessage
)
sc
.
onusermessage
.
call
(
sc
.
onusermessage
.
call
(
sc
,
m
.
id
,
m
.
dest
,
m
.
username
,
m
.
time
,
sc
,
m
.
id
,
m
.
dest
,
m
.
username
,
m
.
time
,
m
.
privile
d
ged
,
m
.
kind
,
m
.
value
,
m
.
privileged
,
m
.
kind
,
m
.
value
,
);
);
break
;
break
;
case
'
clearchat
'
:
case
'
clearchat
'
:
...
...
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