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

Merge branch 'master' of github.com:RocketChat/Rocket.Chat

parents 1768d4dd 308fd946
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,7 @@ FlowRouter.route '/room/:_id',
if not ChatRoom.find(params._id).count()
FlowRouter.go 'home'
return
mainNode = document.querySelector('.main-content')
if mainNode?
......
......@@ -288,6 +288,9 @@ Template.room.helpers
if @lastLogin
return moment(@lastLogin).format('LLL')
canJoin: ->
return !! ChatRoom.findOne { _id: @_id, t: 'c' }
Template.room.events
......
......@@ -78,10 +78,12 @@
</div>
</form>
{{else}}
{{#if canJoin}}
<div>
{{{_ "you_are_in_preview_mode_of" room_name=roomName}}}
<button class="button join"><span><i class="icon-login"></i> {{_ "join"}}</span></button>
</div>
{{/if}}
{{/if}}
</footer>
</section>
......
......@@ -3,6 +3,9 @@ Meteor.methods
fromId = Meteor.userId()
# console.log '[methods] loadHistory -> '.green, 'fromId:', fromId, 'rid:', rid, 'end:', end, 'limit:', limit, 'skip:', skip
unless Meteor.call 'canAccessRoom', rid, fromId
return false
query =
rid: rid
ts:
......
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