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

Fix problem with subscription name been resetted

parent da06ef26
No related branches found
No related tags found
No related merge requests found
...@@ -60,7 +60,16 @@ Meteor.methods({ ...@@ -60,7 +60,16 @@ Meteor.methods({
}); });
RocketChat.models.Subscriptions.on('changed', function(type, subscription) { RocketChat.models.Subscriptions.on('changed', function(type, subscription) {
return RocketChat.Notifications.notifyUserInThisInstance(subscription.u._id, 'subscriptions-changed', type, RocketChat.models.Subscriptions.processQueryOptionsOnResult(subscription, { RocketChat.Notifications.notifyUserInThisInstance(subscription.u._id, 'subscriptions-changed', type, RocketChat.models.Subscriptions.processQueryOptionsOnResult(subscription, {
fields
}));
});
// TODO needs improvement
// We are sending the record again cuz any update on subscription will send the record without the fname (join)
// Then we need to sent it again listening to the join event.
RocketChat.models.Subscriptions.on('join:fname:inserted', function(subscription/*, user*/) {
RocketChat.Notifications.notifyUserInThisInstance(subscription.u._id, 'subscriptions-changed', 'changed', RocketChat.models.Subscriptions.processQueryOptionsOnResult(subscription, {
fields fields
})); }));
}); });
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