title: meteor - How to update subscription documents?
body: <p>I subscribe some collection from server. After I try to delete one document from client side it shows <code>remove failed: Access denied</code>. so I tried to delete it from server side by <code>Meteor.call</code> it works fine but client side has same number of documents.</p>
  
  <p>Below code will explain you better.</p>
  
  <p><strong>ClientJS:</strong></p>
  
  <pre><code>Template.Message.onCreated(function () {
    this.autorun(function () {
      this.subscription = Meteor.subscribe('mymessage');
    }.bind(this));
  });
  
  Template.Message.onRendered(function () {
    this.autorun(function () {
      if (this.subscription.ready()) {
        console.log(Message.find().count()); //10
       }
    }.bind(this));
  });
  </code></pre>
  
  <p><strong>ServerJS:</strong></p>
  
  <pre><code>  Meteor.publish('mymessage', function() {
      console.log(Message.find().count()); //10
      return Message.find();
    }); 
  </code></pre>
  
  <p>In a click event</p>
  
  <p><strong>ClientJS:</strong></p>
  
  <pre><code>Meteor.call("deletemsg", this._id._str, function(error, result){ 
   if(!error){
       console.log(Message.find().count()); // 10, Want to update document here.
     }
  });
  </code></pre>
  
  <p><strong>Serverjs</strong></p>
  
  <pre><code>  Meteor.methods({
      deletemsg: function (delmsg) {
        if(Message.remove({"_id":new Mongo.ObjectID(delmsg)})){
         console.log(Message.find().count()); //9
         return true;
        } else {
          throw new Meteor.Error("some error message");
        }
       }
    });
  </code></pre>
  
  <p>Note : I am using existing Mongodb.</p>