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

Replace all ChatSubscription.upsert

parent c8f6e154
No related branches found
No related tags found
No related merge requests found
......@@ -31,9 +31,9 @@ Meteor.methods
ts: now
# Make user I have a subcription to this room
ChatSubscription.upsert
RocketChat.models.Subscriptions.upsert
rid: rid
$and: [{'u._id': me._id}]
'u._id': me._id
,
$set:
ts: now
......@@ -49,9 +49,9 @@ Meteor.methods
username: me.username
# Make user the target user has a subcription to this room
ChatSubscription.upsert
RocketChat.models.Subscriptions.upsert
rid: rid
$and: [{'u._id': to._id}]
'u._id': to._id
,
$setOnInsert:
name: me.username
......
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