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
d90a3385
Commit
d90a3385
authored
9 years ago
by
Rodrigo Nascimento
Browse files
Options
Downloads
Patches
Plain Diff
Remove UserManager and selectiveUser
parent
bc0a1306
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
client/lib/UserManager.coffee
+0
-28
0 additions, 28 deletions
client/lib/UserManager.coffee
client/views/app/room.coffee
+0
-2
0 additions, 2 deletions
client/views/app/room.coffee
server/publications/selectiveUsers.coffee
+0
-35
0 additions, 35 deletions
server/publications/selectiveUsers.coffee
with
0 additions
and
65 deletions
client/lib/UserManager.coffee
deleted
100644 → 0
+
0
−
28
View file @
bc0a1306
@
UserManager
=
new
class
users
=
{}
dep
=
new
Tracker
.
Dependency
addUser
=
(
usernames
)
->
# console.log 'addUser', usernames if window.rocketUserDebug
usernames
=
[].
concat
usernames
for
username
in
usernames
unless
users
[
username
]
users
[
username
]
=
1
dep
.
changed
()
subscribeFn
=
->
return
true
# Meteor.subscribe 'selectiveUsers', users
subscribe
=
new
DelayedTask
subscribeFn
,
100
,
1000
init
=
->
Tracker
.
autorun
->
dep
.
depend
()
subscribe
.
run
()
# init()
addUser
:
addUser
users
:
users
This diff is collapsed.
Click to expand it.
client/views/app/room.coffee
+
0
−
2
View file @
d90a3385
...
...
@@ -76,7 +76,6 @@ Template.room.helpers
if
roomData
.
t
is
'd'
username
=
_
.
without
roomData
.
usernames
,
Meteor
.
user
().
username
UserManager
.
addUser
username
userData
=
{
name
:
Session
.
get
(
'user_'
+
username
+
'_name'
)
...
...
@@ -189,7 +188,6 @@ Template.room.helpers
for
username
in
room
?
.
usernames
or
[]
if
onlineUsers
[
username
]
?
utcOffset
=
onlineUsers
[
username
]
?
.
utcOffset
console
.
log
utcOffset
if
utcOffset
?
if
utcOffset
>
0
utcOffset
=
"+
#{
utcOffset
}
"
...
...
This diff is collapsed.
Click to expand it.
server/publications/selectiveUsers.coffee
deleted
100644 → 0
+
0
−
35
View file @
bc0a1306
Meteor
.
publish
'selectiveUsers'
,
(
usernames
)
->
unless
this
.
userId
return
this
.
ready
()
console
.
log
'[publish] selectiveUsers -> '
.
green
,
'userIds:'
,
userIds
self
=
this
query
=
username
:
$exists
:
true
options
=
fields
:
name
:
1
username
:
1
status
:
1
utcOffset
:
1
cursor
=
Meteor
.
users
.
find
query
,
options
observer
=
cursor
.
observeChanges
added
:
(
id
,
record
)
->
if
usernames
[
record
.
username
]
?
self
.
added
'users'
,
id
,
record
changed
:
(
id
,
record
)
->
if
usernames
[
record
.
username
]
?
self
.
changed
'users'
,
id
,
record
removed
:
(
id
)
->
if
usernames
[
record
.
username
]
?
self
.
removed
'users'
,
id
this
.
ready
()
this
.
onStop
->
observer
.
stop
()
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