sinfo / eventdeck

:calendar: The awesome web app that supports awesome events

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Coordinators should be subscribed to everything

Makay11 opened this issue · comments

Can you guys tell me if this will do it?

https://gist.github.com/Makay11/2130756b74850f7edd1e

@Makay11 what you have to do is for every coordinator, run every speaker/company/topic and do an update with {upsert: true} on subscriptions collection, that will create a subscription with the thing id and user id if doesn't exist one (use also $setOnInsert option).

Aside from all of this you will also have to make new subscriptions on every new thread that is created. (it's easy, just put a subscription.create with the respective ids on the pres of every create company/speaker/topic.

Atention with hardcoding ids. This should work with new coordinators.

Same with permissions and such. You can do it as long as you document it for change

-----Original Message-----
From: "João Antunes" notifications@github.com
Sent: ‎01/‎02/‎2015 17:34
To: "sinfo/eventdeck" eventdeck@noreply.github.com
Subject: Re: [eventdeck] Coordinators should be subscribed to everything(#268)

@Makay11 what you have to do is for every coordinator, run every speaker/company/topic and do an update with {upsert: true} on subscriptions collection, that will create a subscription with the thing id and user id if doesn't exist one (use also $setOnInsert option).
Aside from all of this you will also have to make new subscriptions on every new thread that is created. (it's easy, just put a subscription.create with the respective ids on the pres of every create company/speaker/topic.

Reply to this email directly or view it on GitHub.=

@palma21 There will be no hardcoded ids, I just get the coordinators from the DB in real time.

@JGAntunes Did you see my Gist? I'm iterating over every company/speaker and creating a subscription for every coordinator if there isn't one already. I think it should be enough, right?

Hum and new ones?
And os this done just once? And them new ones will be subscribed auto?

Sorry, on my phone

-----Original Message-----
From: "Diogo Pais" notifications@github.com
Sent: ‎01/‎02/‎2015 17:40
To: "sinfo/eventdeck" eventdeck@noreply.github.com
Cc: "Jorge Palma" jorge.palma@ist.utl.pt
Subject: Re: [eventdeck] Coordinators should be subscribed to everything(#268)

@JGAntunes Did you see my Gist? I'm iterating over every company/speaker and creating a subscription for every coordinator if there isn't one already. I think it should be enough, right?

Reply to this email directly or view it on GitHub.=

@palma21 The script I made is meant to be run once to create all the subscriptions right now. The new subscriptions will then be created when a new thread is created, like @JGAntunes said.

The logic sounds ok

-----Original Message-----
From: "Diogo Pais" notifications@github.com
Sent: ‎01/‎02/‎2015 17:44
To: "sinfo/eventdeck" eventdeck@noreply.github.com
Cc: "Jorge Palma" jorge.palma@ist.utl.pt
Subject: Re: [eventdeck] Coordinators should be subscribed to everything(#268)

@palma21 The script I made is meant to be run once to create all the subscriptions right now. The new subscriptions will then be created when a new thread is created, like @JGAntunes said.

Reply to this email directly or view it on GitHub.=

Someone please review this commit to make sure nothing breaks: 07f0d52