ssb: Respect blocks when getting blocks and accounts at the db level.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 8m59s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 8m59s
This commit is contained in:
@@ -1903,12 +1903,15 @@ void tf_ssb_test_blocks(const tf_test_options_t* options)
|
||||
}
|
||||
JS_FreeValue(context, obj);
|
||||
|
||||
assert(tf_ssb_db_blob_get(ssb, blob_id, NULL, NULL));
|
||||
|
||||
sqlite3* db = tf_ssb_acquire_db_writer(ssb);
|
||||
tf_ssb_db_add_block(db, message_id);
|
||||
assert(tf_ssb_db_is_blocked(db, message_id));
|
||||
/* Blocked already, because the blocked message references it. */
|
||||
assert(tf_ssb_db_is_blocked(db, blob_id));
|
||||
tf_ssb_db_add_block(db, blob_id);
|
||||
assert(!tf_ssb_db_blob_get(ssb, blob_id, NULL, NULL));
|
||||
tf_ssb_db_add_block(db, id);
|
||||
assert(tf_ssb_db_is_blocked(db, id));
|
||||
tf_ssb_db_remove_block(db, blob_id);
|
||||
@@ -1918,6 +1921,7 @@ void tf_ssb_test_blocks(const tf_test_options_t* options)
|
||||
assert(!tf_ssb_db_is_blocked(db, blob_id));
|
||||
assert(!tf_ssb_db_is_blocked(db, id));
|
||||
tf_ssb_release_db_writer(ssb, db);
|
||||
assert(tf_ssb_db_blob_get(ssb, blob_id, NULL, NULL));
|
||||
|
||||
tf_ssb_destroy(ssb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user