Skip to content
Snippets Groups Projects
Commit c33d75a7 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

Fix oembed

parent 3c631eb2
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ RocketChat.sendMessage = (user, message, room, options) ->
message.rid = room._id
if not message.parseUrls is false
if message.parseUrls isnt false
if urls = message.msg.match /([A-Za-z]{3,9}):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+=!:~%\/\.@\,\w]+)?\??([-\+=&!:;%@\/\.\,\w]+)?#?([\w]+)?)?/g
message.urls = urls.map (url) -> url: url
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment