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
9a014c75
"git@gitlab.ow2.org:RocketChat/Rocket.Chat.git" did not exist on "8e10dd4e2d309ad2548ff40ebcd5483114099048"
Commit
9a014c75
authored
9 years ago
by
George Secrieru
Browse files
Options
Downloads
Patches
Plain Diff
Fixing embedded urls on updated messages.
parent
a0eacea3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
server/methods/updateMessage.coffee
+4
-4
4 additions, 4 deletions
server/methods/updateMessage.coffee
with
4 additions
and
4 deletions
server/methods/updateMessage.coffee
+
4
−
4
View file @
9a014c75
...
...
@@ -4,7 +4,7 @@ Meteor.methods
throw
new
Meteor
.
Error
(
'invalid-user'
,
"[methods] updateMessage -> Invalid user"
)
originalMessage
=
RocketChat
.
models
.
Messages
.
findOneById
message
.
_id
if
not
originalMessage
?
.
_id
?
return
...
...
@@ -31,7 +31,7 @@ Meteor.methods
message
.
ets
=
new
Date
()
if
urls
=
message
.
msg
.
match
/([A-Za-z]{3,9}):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+=!:~%\/\.@\,\w]+)?\??([-\+=&!:;%@\/\.\,\w]+)?#?([\w]+)?)?/g
message
.
urls
=
urls
message
.
urls
=
urls
.
map
(
url
)
->
url
:
url
message
=
RocketChat
.
callbacks
.
run
'beforeSaveMessage'
,
message
...
...
@@ -43,5 +43,5 @@ Meteor.methods
,
$set
:
message
#
Meteor.defer ->
#
RocketChat.callbacks.run 'afterSaveMessage', RocketChat.models.Messages.findOneById(
message.
id)
Meteor
.
defer
->
RocketChat
.
callbacks
.
run
'afterSaveMessage'
,
RocketChat
.
models
.
Messages
.
findOneById
(
temp
id
)
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