@@ -107,7 +107,8 @@ void BatPublishers::saveVisit(const std::string& publisher_id,
107
107
visit_data.local_year ,
108
108
ledger::PUBLISHER_EXCLUDE_FILTER::FILTER_ALL,
109
109
false ,
110
- ledger_->GetReconcileStamp ());
110
+ ledger_->GetReconcileStamp (),
111
+ true );
111
112
112
113
ledger::PublisherInfoCallback callbackGetPublishers = std::bind (&BatPublishers::saveVisitInternal, this ,
113
114
publisher_id,
@@ -130,7 +131,8 @@ ledger::PublisherInfoFilter BatPublishers::CreatePublisherFilter(
130
131
year,
131
132
ledger::PUBLISHER_EXCLUDE_FILTER::FILTER_ALL,
132
133
true ,
133
- 0 );
134
+ 0 ,
135
+ true );
134
136
}
135
137
136
138
ledger::PublisherInfoFilter BatPublishers::CreatePublisherFilter (
@@ -145,7 +147,8 @@ ledger::PublisherInfoFilter BatPublishers::CreatePublisherFilter(
145
147
year,
146
148
excluded,
147
149
true ,
148
- 0 );
150
+ 0 ,
151
+ true );
149
152
}
150
153
151
154
ledger::PublisherInfoFilter BatPublishers::CreatePublisherFilter (
@@ -160,7 +163,8 @@ ledger::PublisherInfoFilter BatPublishers::CreatePublisherFilter(
160
163
year,
161
164
ledger::PUBLISHER_EXCLUDE_FILTER::FILTER_ALL,
162
165
min_duration,
163
- 0 );
166
+ 0 ,
167
+ true );
164
168
}
165
169
166
170
ledger::PublisherInfoFilter BatPublishers::CreatePublisherFilter (
@@ -170,7 +174,8 @@ ledger::PublisherInfoFilter BatPublishers::CreatePublisherFilter(
170
174
int year,
171
175
ledger::PUBLISHER_EXCLUDE_FILTER excluded,
172
176
bool min_duration,
173
- const uint64_t & currentReconcileStamp) {
177
+ const uint64_t & currentReconcileStamp,
178
+ bool non_verified) {
174
179
ledger::PublisherInfoFilter filter;
175
180
filter.id = publisher_id;
176
181
filter.category = category;
@@ -179,6 +184,7 @@ ledger::PublisherInfoFilter BatPublishers::CreatePublisherFilter(
179
184
filter.excluded = excluded;
180
185
filter.min_duration = min_duration ? getPublisherMinVisitTime () : 0 ;
181
186
filter.reconcile_stamp = currentReconcileStamp;
187
+ filter.non_verified = non_verified;
182
188
183
189
return filter;
184
190
}
@@ -230,6 +236,12 @@ void BatPublishers::saveVisitInternal(
230
236
return ;
231
237
}
232
238
239
+ bool verified = isVerified (publisher_id);
240
+
241
+ if (!ledger_->GetPublisherAllowNonVerified () && !verified) {
242
+ return ;
243
+ }
244
+
233
245
bool new_visit = false ;
234
246
if (!publisher_info.get ()) {
235
247
new_visit = true ;
@@ -257,7 +269,7 @@ void BatPublishers::saveVisitInternal(
257
269
}
258
270
}
259
271
publisher_info->score += concaveScore (duration);
260
- publisher_info->verified = isVerified (publisher_info-> id ) ;
272
+ publisher_info->verified = verified ;
261
273
publisher_info->reconcile_stamp = ledger_->GetReconcileStamp ();
262
274
263
275
auto media_info = std::make_unique<ledger::PublisherInfo>(*publisher_info);
@@ -293,7 +305,8 @@ void BatPublishers::setExclude(const std::string& publisher_id, const ledger::PU
293
305
-1 ,
294
306
ledger::PUBLISHER_EXCLUDE_FILTER::FILTER_ALL,
295
307
false ,
296
- currentReconcileStamp);
308
+ currentReconcileStamp,
309
+ true );
297
310
ledger_->GetPublisherInfo (filter, std::bind (&BatPublishers::onSetExcludeInternal,
298
311
this , exclude, _1, _2));
299
312
}
@@ -307,7 +320,8 @@ void BatPublishers::setPanelExclude(const std::string& publisher_id,
307
320
-1 ,
308
321
ledger::PUBLISHER_EXCLUDE_FILTER::FILTER_ALL,
309
322
false ,
310
- currentReconcileStamp);
323
+ currentReconcileStamp,
324
+ true );
311
325
ledger_->GetPublisherInfo (filter, std::bind (
312
326
&BatPublishers::onSetPanelExcludeInternal,
313
327
this , exclude, windowId, _1, _2));
@@ -394,7 +408,8 @@ void BatPublishers::restorePublishers() {
394
408
-1 ,
395
409
ledger::PUBLISHER_EXCLUDE_FILTER::FILTER_EXCLUDED,
396
410
false ,
397
- currentReconcileStamp);
411
+ currentReconcileStamp,
412
+ true );
398
413
ledger_->GetPublisherInfoList (0 , 0 , filter, std::bind (&BatPublishers::onRestorePublishersInternal,
399
414
this , _1, _2));
400
415
}
@@ -560,7 +575,8 @@ void BatPublishers::synopsisNormalizer(const ledger::PublisherInfo& info) {
560
575
info.year ,
561
576
ledger::PUBLISHER_EXCLUDE_FILTER::FILTER_ALL_EXCEPT_EXCLUDED,
562
577
true ,
563
- ledger_->GetReconcileStamp ());
578
+ ledger_->GetReconcileStamp (),
579
+ ledger_->GetPublisherAllowNonVerified ());
564
580
// TODO SZ: We pull the whole list currently, I don't think it consumes lots of RAM, but could.
565
581
// We need to limit it and iterate.
566
582
ledger_->GetPublisherInfoList (0 , 0 , filter, std::bind (&BatPublishers::synopsisNormalizerInternal, this ,
@@ -788,7 +804,8 @@ void BatPublishers::getPublisherActivityFromUrl(uint64_t windowId, const ledger:
788
804
visit_data.local_year ,
789
805
ledger::PUBLISHER_EXCLUDE_FILTER::FILTER_ALL,
790
806
false ,
791
- ledger_->GetReconcileStamp ());
807
+ ledger_->GetReconcileStamp (),
808
+ true );
792
809
793
810
ledger::VisitData new_data;
794
811
new_data.domain = visit_data.domain ;
@@ -885,7 +902,8 @@ void BatPublishers::getPublisherBanner(const std::string& publisher_id,
885
902
-1 ,
886
903
ledger::PUBLISHER_EXCLUDE_FILTER::FILTER_ALL,
887
904
false ,
888
- currentReconcileStamp);
905
+ currentReconcileStamp,
906
+ true );
889
907
890
908
ledger::PublisherInfoCallback callbackGetPublisher = std::bind (&BatPublishers::onPublisherBanner,
891
909
this ,
0 commit comments