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
b169e70f
Commit
b169e70f
authored
9 years ago
by
Gabriel Engel
Browse files
Options
Downloads
Patches
Plain Diff
separate collections definitions between server and client
parent
dc9c7cb7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
client/lib/collections.coffee
+20
-0
20 additions, 0 deletions
client/lib/collections.coffee
server/lib/collections.coffee
+0
-0
0 additions, 0 deletions
server/lib/collections.coffee
with
20 additions
and
0 deletions
client/lib/collections.coffee
+
20
−
0
View file @
b169e70f
@
UserFullName
=
{}
@
UserAndRoom
=
new
Meteor
.
Collection
null
@
ChatMessageHistory
=
new
Meteor
.
Collection
null
@
ChatRoom
=
new
Meteor
.
Collection
'data.ChatRoom'
@
ChatSubscription
=
new
Meteor
.
Collection
'data.ChatSubscription'
@
ChatMessage
=
new
Meteor
.
Collection
'data.ChatMessage'
# ,
# transform: (room) ->
# if room.t is 'd' and Meteor.userId()?
# if not UserFullName[Meteor.userId()]?
# user = Meteor.users.findOne Meteor.userId()
# UserFullName[Meteor.userId()] = user.name
# regex = new RegExp('\\|?' + UserFullName[Meteor.userId()] + '\\|?')
# room.name = room.name.replace(regex, '')
# return room
Meteor
.
startup
->
ChatMessage
.
find
().
observe
added
:
(
record
)
->
...
...
@@ -10,3 +29,4 @@ Meteor.startup ->
removed
:
(
record
)
->
if
ChatRoom
.
_collection
.
_docs
.
_map
[
record
.
rid
]
?
and
not
ChatMessageHistory
.
_collection
.
_docs
.
_map
[
record
.
_id
]
?
ChatMessageHistory
.
insert
record
This diff is collapsed.
Click to expand it.
lib/collections.coffee
→
server/
lib/collections.coffee
+
0
−
0
View file @
b169e70f
File moved
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