Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
15bf0c96
Commit
15bf0c96
authored
9 years ago
by
Rodrigo Nascimento
Browse files
Options
Downloads
Patches
Plain Diff
Fix the setting UTF8_Names_Slugify
parent
82c5ac02
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
client/methods/saveRoomName.coffee
+1
-1
1 addition, 1 deletion
client/methods/saveRoomName.coffee
server/methods/getUsernameSuggestion.coffee
+5
-5
5 additions, 5 deletions
server/methods/getUsernameSuggestion.coffee
server/methods/saveRoomName.coffee
+1
-1
1 addition, 1 deletion
server/methods/saveRoomName.coffee
with
7 additions
and
7 deletions
client/methods/saveRoomName.coffee
+
1
−
1
View file @
15bf0c96
...
@@ -8,7 +8,7 @@ Meteor.methods
...
@@ -8,7 +8,7 @@ Meteor.methods
if
room
.
u
.
_id
isnt
Meteor
.
userId
()
or
room
.
t
not
in
[
'c'
,
'p'
]
if
room
.
u
.
_id
isnt
Meteor
.
userId
()
or
room
.
t
not
in
[
'c'
,
'p'
]
throw
new
Meteor
.
Error
403
,
t
(
'Not allowed'
)
throw
new
Meteor
.
Error
403
,
t
(
'Not allowed'
)
if
RocketChat
.
settings
.
get
'UTF8_Names_
s
lugify'
if
RocketChat
.
settings
.
get
'UTF8_Names_
S
lugify'
name
=
_
.
slugify
name
name
=
_
.
slugify
name
if
name
is
room
.
name
if
name
is
room
.
name
...
...
This diff is collapsed.
Click to expand it.
server/methods/getUsernameSuggestion.coffee
+
5
−
5
View file @
15bf0c96
...
@@ -15,7 +15,7 @@ usernameIsAvaliable = (username) ->
...
@@ -15,7 +15,7 @@ usernameIsAvaliable = (username) ->
usernames
=
[]
usernames
=
[]
username
=
undefined
username
=
undefined
if
RocketChat
.
settings
.
get
'UTF8_Names_
s
lugify'
if
RocketChat
.
settings
.
get
'UTF8_Names_
S
lugify'
usernames
.
push
slug
user
.
name
usernames
.
push
slug
user
.
name
else
else
usernames
.
push
user
.
name
usernames
.
push
user
.
name
...
@@ -25,7 +25,7 @@ usernameIsAvaliable = (username) ->
...
@@ -25,7 +25,7 @@ usernameIsAvaliable = (username) ->
first
=
nameParts
[
0
]
first
=
nameParts
[
0
]
last
=
nameParts
[
nameParts
.
length
-
1
]
last
=
nameParts
[
nameParts
.
length
-
1
]
if
RocketChat
.
settings
.
get
'UTF8_Names_
s
lugify'
if
RocketChat
.
settings
.
get
'UTF8_Names_
S
lugify'
usernames
.
push
slug
first
[
0
]
+
last
usernames
.
push
slug
first
[
0
]
+
last
usernames
.
push
slug
first
+
last
[
0
]
usernames
.
push
slug
first
+
last
[
0
]
else
else
...
@@ -33,7 +33,7 @@ usernameIsAvaliable = (username) ->
...
@@ -33,7 +33,7 @@ usernameIsAvaliable = (username) ->
usernames
.
push
first
+
last
[
0
]
usernames
.
push
first
+
last
[
0
]
if
user
.
profile
?
.
name
?
if
user
.
profile
?
.
name
?
if
RocketChat
.
settings
.
get
'UTF8_Names_
s
lugify'
if
RocketChat
.
settings
.
get
'UTF8_Names_
S
lugify'
usernames
.
push
slug
user
.
profile
.
name
usernames
.
push
slug
user
.
profile
.
name
else
else
usernames
.
push
user
.
profile
.
name
usernames
.
push
user
.
profile
.
name
...
@@ -41,12 +41,12 @@ usernameIsAvaliable = (username) ->
...
@@ -41,12 +41,12 @@ usernameIsAvaliable = (username) ->
if
user
.
services
?
if
user
.
services
?
for
serviceName
,
service
of
user
.
services
for
serviceName
,
service
of
user
.
services
if
service
.
name
?
if
service
.
name
?
if
RocketChat
.
settings
.
get
'UTF8_Names_
s
lugify'
if
RocketChat
.
settings
.
get
'UTF8_Names_
S
lugify'
usernames
.
push
slug
service
.
name
usernames
.
push
slug
service
.
name
else
else
usernames
.
push
service
.
name
usernames
.
push
service
.
name
else
if
service
.
username
?
else
if
service
.
username
?
if
RocketChat
.
settings
.
get
'UTF8_Names_
s
lugify'
if
RocketChat
.
settings
.
get
'UTF8_Names_
S
lugify'
usernames
.
push
slug
service
.
username
usernames
.
push
slug
service
.
username
else
else
usernames
.
push
service
.
username
usernames
.
push
service
.
username
...
...
This diff is collapsed.
Click to expand it.
server/methods/saveRoomName.coffee
+
1
−
1
View file @
15bf0c96
...
@@ -20,7 +20,7 @@ Meteor.methods
...
@@ -20,7 +20,7 @@ Meteor.methods
if
not
nameValidation
.
test
name
if
not
nameValidation
.
test
name
throw
new
Meteor
.
Error
'name-invalid'
throw
new
Meteor
.
Error
'name-invalid'
if
RocketChat
.
settings
.
get
'UTF8_Names_
s
lugify'
if
RocketChat
.
settings
.
get
'UTF8_Names_
S
lugify'
name
=
_
.
slugify
name
name
=
_
.
slugify
name
if
name
is
room
.
name
if
name
is
room
.
name
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment