Don't notify of updated close time when resolving market
This commit is contained in:
parent
6a5873f8d4
commit
c183315d52
|
@ -416,8 +416,9 @@ export const createCommentOrAnswerOrUpdatedContractNotification = async (
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: store all possible reasons why the user might be getting the notification and choose the most lenient that they
|
//TODO: store all possible reasons why the user might be getting the notification
|
||||||
// have enabled so they will unsubscribe from the least important notifications
|
// and choose the most lenient that they have enabled so they will unsubscribe
|
||||||
|
// from the least important notifications
|
||||||
await notifyRepliedUser()
|
await notifyRepliedUser()
|
||||||
await notifyTaggedUsers()
|
await notifyTaggedUsers()
|
||||||
await notifyContractCreator()
|
await notifyContractCreator()
|
||||||
|
|
|
@ -13,6 +13,10 @@ export const onUpdateContract = functions.firestore
|
||||||
if (!contractUpdater) throw new Error('Could not find contract updater')
|
if (!contractUpdater) throw new Error('Could not find contract updater')
|
||||||
|
|
||||||
const previousValue = change.before.data() as Contract
|
const previousValue = change.before.data() as Contract
|
||||||
|
|
||||||
|
// Resolution is handled in resolve-market.ts
|
||||||
|
if (!previousValue.isResolved && contract.isResolved) return
|
||||||
|
|
||||||
if (
|
if (
|
||||||
previousValue.closeTime !== contract.closeTime ||
|
previousValue.closeTime !== contract.closeTime ||
|
||||||
previousValue.question !== contract.question
|
previousValue.question !== contract.question
|
||||||
|
|
|
@ -63,7 +63,6 @@ export function NotificationSettings(props: {
|
||||||
'contract_from_followed_user',
|
'contract_from_followed_user',
|
||||||
'unique_bettors_on_your_contract',
|
'unique_bettors_on_your_contract',
|
||||||
// TODO: add these
|
// TODO: add these
|
||||||
// one-click unsubscribe only unsubscribes them from that type only, (well highlighted), then a link to manage the rest of their notifications
|
|
||||||
// 'profit_loss_updates', - changes in markets you have shares in
|
// 'profit_loss_updates', - changes in markets you have shares in
|
||||||
// biggest winner, here are the rest of your markets
|
// biggest winner, here are the rest of your markets
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user