File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -295,10 +295,16 @@ Parse.Cloud.beforeSave(
295
295
book . set ( "updateSource" , newUpdateSource ) ;
296
296
}
297
297
// As of April 2020, BloomDesktop 4.7 now sets the updateSource to "BloomDesktop {version}".
298
+ // In Bloom 5.6 (Oct 2023), we started uploading through an API.
299
+ // For book updates, updateSource behaves as previously. But for new books,
300
+ // the parse record creation is a two-step process. upload-start creates an empty record
301
+ // with updateSource="BloomDesktop via API". Then upload-finish fills in the record
302
+ // and includes updateSource="BloomDesktop {version} (new book)" so we can distinguish
303
+ // that type of new-book update from a real update.
298
304
if ( newUpdateSource . startsWith ( "BloomDesktop" ) ) {
299
305
// Change came from BloomDesktop upload (or reupload)
300
306
book . addUnique ( "tags" , "system:Incoming" ) ;
301
- if ( book . isNew ( ) ) {
307
+ if ( book . isNew ( ) || newUpdateSource . endsWith ( "(new book)" ) ) {
302
308
book . set ( "harvestState" , "New" ) ;
303
309
} else {
304
310
book . set ( "harvestState" , "Updated" ) ;
You can’t perform that action at this time.
0 commit comments