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
d82d02d1
Commit
d82d02d1
authored
9 years ago
by
Rodrigo Nascimento
Browse files
Options
Downloads
Patches
Plain Diff
Rename onlineUsers to filteredUsers
parent
e56c2238
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
client/views/app/messagePopupConfig.coffee
+5
-5
5 additions, 5 deletions
client/views/app/messagePopupConfig.coffee
server/publications/filteredUsers.coffee
+5
-5
5 additions, 5 deletions
server/publications/filteredUsers.coffee
with
10 additions
and
10 deletions
client/views/app/messagePopupConfig.coffee
+
5
−
5
View file @
d82d02d1
@
online
Users
=
new
Mongo
.
Collection
'
online
-users'
@
filtered
Users
=
new
Mongo
.
Collection
'
filtered
-users'
Template
.
messagePopupConfig
.
helpers
Template
.
messagePopupConfig
.
helpers
popupUserConfig
:
->
popupUserConfig
:
->
...
@@ -6,14 +6,14 @@ Template.messagePopupConfig.helpers
...
@@ -6,14 +6,14 @@ Template.messagePopupConfig.helpers
template
=
Template
.
instance
()
template
=
Template
.
instance
()
config
=
config
=
title
:
'People'
title
:
'People'
collection
:
online
Users
collection
:
filtered
Users
template
:
'messagePopupUser'
template
:
'messagePopupUser'
getInput
:
self
.
getInput
getInput
:
self
.
getInput
textFilterDelay
:
200
textFilterDelay
:
200
getFilter
:
(
collection
,
filter
)
->
getFilter
:
(
collection
,
filter
)
->
exp
=
new
RegExp
(
filter
,
'i'
)
exp
=
new
RegExp
(
filter
,
'i'
)
Meteor
.
subscribe
'
online
Users'
,
filter
Meteor
.
subscribe
'
filtered
Users'
,
filter
items
=
online
Users
.
find
({
$or
:
[{
name
:
exp
},
{
username
:
exp
}]},
{
limit
:
5
}).
fetch
()
items
=
filtered
Users
.
find
({
$or
:
[{
name
:
exp
},
{
username
:
exp
}]},
{
limit
:
5
}).
fetch
()
all
=
all
=
_id
:
'@all'
_id
:
'@all'
...
@@ -121,4 +121,4 @@ Template.messagePopupConfig.helpers
...
@@ -121,4 +121,4 @@ Template.messagePopupConfig.helpers
return
results
return
results
return
config
return
config
\ No newline at end of file
This diff is collapsed.
Click to expand it.
server/publications/
online
Users.coffee
→
server/publications/
filtered
Users.coffee
+
5
−
5
View file @
d82d02d1
Meteor
.
publish
'
online
Users'
,
(
name
)
->
Meteor
.
publish
'
filtered
Users'
,
(
name
)
->
unless
this
.
userId
unless
this
.
userId
return
this
.
ready
()
return
this
.
ready
()
console
.
log
'[publish]
online
Users'
.
green
,
name
console
.
log
'[publish]
filtered
Users'
.
green
,
name
exp
=
new
RegExp
(
name
,
'i'
)
exp
=
new
RegExp
(
name
,
'i'
)
...
@@ -29,13 +29,13 @@ Meteor.publish 'onlineUsers', (name) ->
...
@@ -29,13 +29,13 @@ Meteor.publish 'onlineUsers', (name) ->
cursorHandle
=
Meteor
.
users
.
find
(
query
,
options
).
observeChanges
cursorHandle
=
Meteor
.
users
.
find
(
query
,
options
).
observeChanges
added
:
(
_id
,
record
)
->
added
:
(
_id
,
record
)
->
pub
.
added
(
'
online
-users'
,
_id
,
record
)
pub
.
added
(
'
filtered
-users'
,
_id
,
record
)
changed
:
(
_id
,
record
)
->
changed
:
(
_id
,
record
)
->
pub
.
changed
(
'
online
-users'
,
_id
,
record
)
pub
.
changed
(
'
filtered
-users'
,
_id
,
record
)
removed
:
(
_id
,
record
)
->
removed
:
(
_id
,
record
)
->
pub
.
removed
(
'
online
-users'
,
_id
,
record
)
pub
.
removed
(
'
filtered
-users'
,
_id
,
record
)
@
ready
()
@
ready
()
@
onStop
->
@
onStop
->
...
...
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