validate legacy notification filters
This commit is contained in:
@@ -91,7 +91,7 @@ function open({ create = true } = {}) {
|
|||||||
const used=new Set();
|
const used=new Set();
|
||||||
for(const row of rows) {
|
for(const row of rows) {
|
||||||
const key=subscriptionKey({sehir:row.sehir,sektor:row.sektor,alimTuru:row.alim_turu,anahtar:row.anahtar,
|
const key=subscriptionKey({sehir:row.sehir,sektor:row.sektor,alimTuru:row.alim_turu,anahtar:row.anahtar,
|
||||||
konular:JSON.parse(row.konular || '[]'),kurumlar:JSON.parse(row.kurumlar || '[]')});
|
konular:parseArrayJson(row.konular, 'Eski konu filtresi'),kurumlar:parseArrayJson(row.kurumlar, 'Eski kurum filtresi')});
|
||||||
const identity=JSON.stringify([row.email,key]);
|
const identity=JSON.stringify([row.email,key]);
|
||||||
// Preserve legacy duplicates and their delivery history; do not discard records.
|
// Preserve legacy duplicates and their delivery history; do not discard records.
|
||||||
row.criteria_key=used.has(identity)?key+':legacy:'+row.id:key;used.add(identity);
|
row.criteria_key=used.has(identity)?key+':legacy:'+row.id:key;used.add(identity);
|
||||||
|
|||||||
Reference in New Issue
Block a user