Loading packages/rocketchat-lib/server/functions/sendMessage.coffee +5 −1 Original line number Original line Diff line number Diff line Loading @@ -13,7 +13,11 @@ RocketChat.sendMessage = (user, message, room, upsert = false) -> message.rid = room._id message.rid = room._id if not room.usernames? || room.usernames.length is 0 if not room.usernames? || room.usernames.length is 0 room = RocketChat.models.Rooms.findOneById(room._id) updated_room = RocketChat.models.Rooms.findOneById(room._id) if updated_room? room = updated_room else room.usernames = [] if message.parseUrls isnt 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]+)?(?:#([^\s\)]+))?)?/g if urls = message.msg.match /([A-Za-z]{3,9}):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+=!:~%\/\.@\,\w]*)?\??([-\+=&!:;%@\/\.\,\w]+)?(?:#([^\s\)]+))?)?/g Loading Loading
packages/rocketchat-lib/server/functions/sendMessage.coffee +5 −1 Original line number Original line Diff line number Diff line Loading @@ -13,7 +13,11 @@ RocketChat.sendMessage = (user, message, room, upsert = false) -> message.rid = room._id message.rid = room._id if not room.usernames? || room.usernames.length is 0 if not room.usernames? || room.usernames.length is 0 room = RocketChat.models.Rooms.findOneById(room._id) updated_room = RocketChat.models.Rooms.findOneById(room._id) if updated_room? room = updated_room else room.usernames = [] if message.parseUrls isnt 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]+)?(?:#([^\s\)]+))?)?/g if urls = message.msg.match /([A-Za-z]{3,9}):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+=!:~%\/\.@\,\w]*)?\??([-\+=&!:;%@\/\.\,\w]+)?(?:#([^\s\)]+))?)?/g Loading