-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Supporting Private Group reopening (Fixes #740)
- Adding Private Groups list ("More groups") - Bug fixed: rocketchat_subscription "open" flag is now updated when user reopens a given room
- Loading branch information
1 parent
35786b9
commit c7b87fb
Showing
9 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Meteor.methods | ||
openRoom: (rid) -> | ||
if not Meteor.userId() | ||
throw new Meteor.Error 'invalid-user', '[methods] openRoom -> Invalid user' | ||
|
||
ChatSubscription.update | ||
rid: rid | ||
'u._id': Meteor.userId() | ||
, | ||
$set: | ||
open: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
Template.listPrivateGroupsFlex.helpers | ||
groups: -> | ||
return ChatSubscription.find { t: { $in: ['p']}, f: { $ne: true } }, { sort: 't': 1, 'name': 1 } | ||
|
||
Template.listPrivateGroupsFlex.events | ||
'click header': -> | ||
SideNav.closeFlex() | ||
|
||
'click .channel-link': -> | ||
SideNav.closeFlex() | ||
|
||
'click footer .create': -> | ||
SideNav.setFlex "createChannelFlex" | ||
|
||
'mouseenter header': -> | ||
SideNav.overArrow() | ||
|
||
'mouseleave header': -> | ||
SideNav.leaveArrow() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<template name="listPrivateGroupsFlex"> | ||
<header> | ||
<div> | ||
<h4>{{_ "Private_Groups"}}</h4> | ||
</div> | ||
</header> | ||
<div class="content"> | ||
<div class="wrapper"> | ||
<h4>{{_ "Private_Groups_list"}}</h4> | ||
<ul> | ||
{{#each groups}} | ||
<li> | ||
<a href="{{pathFor 'group' name=name}}" class="channel-link"> | ||
<i class="icon-lock"></i> | ||
{{name}} | ||
</a> | ||
</li> | ||
{{/each}} | ||
</ul> | ||
</div> | ||
</div> | ||
<footer> | ||
<div> | ||
<button class="button clean create">{{_ "Create_new"}}</button> | ||
</div> | ||
</footer> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Meteor.methods | ||
openRoom: (rid) -> | ||
if not Meteor.userId() | ||
throw new Meteor.Error 'invalid-user', '[methods] openRoom -> Invalid user' | ||
|
||
console.log '[methods] openRoom -> '.green, 'userId:', Meteor.userId(), 'arguments:', arguments | ||
|
||
ChatSubscription.update | ||
rid: rid | ||
'u._id': Meteor.userId() | ||
, | ||
$set: | ||
open: true |