Hi there,
Maybe I’m approaching things the wrong way but I’m trying to notify different Collections of changes from the same Publication,
I have a Selections Collection and a Projects Collection
I have a Publication that I Subscribe to at some point
and all works fine as long as I stick to publishing to one Collection
I’m using Cursor.observe
in the publication and wanted to do something like this (I removed added and removed callbacks for clarity) :
const selections = Selections.find();
const _o = selections.observe({
changed: (selection) => {
if (selection.project_id) {
this.changed('Projects', selection.project_id, { modifiedAt: new Date() });
}
this.changed('Selections', selection._id, transform(selection));
},
});
```
I'm using the websocket panel in devTools to watch what's happening and the 'changed' ddp messages are only sent to the _Selections_ Collection
As I read the docs and the "counts-by-room" example in the `publish` chapter I was under the impression that you could dispatch to any Collection of your choosing
I also tried only publishing to _Projects_ but this does not work either
finally it seems like using `added()` works as expected but I'm not being able to use `changed()`
probably missing something obvious but I thought I'd ask and see if some one can help me in the right direction
thank you