ssb: Make blocks begin to do something.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 9m21s

This commit is contained in:
2025-11-27 16:43:15 -05:00
parent eecdbf6852
commit 4f2e0245d3
5 changed files with 58 additions and 8 deletions

View File

@@ -1905,11 +1905,18 @@ void tf_ssb_test_blocks(const tf_test_options_t* options)
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);
tf_ssb_db_add_block(db, id);
assert(tf_ssb_db_is_blocked(db, id));
tf_ssb_db_remove_block(db, blob_id);
tf_ssb_db_remove_block(db, message_id);
tf_ssb_db_remove_block(db, id);
assert(!tf_ssb_db_is_blocked(db, message_id));
assert(!tf_ssb_db_is_blocked(db, blob_id));
assert(!tf_ssb_db_is_blocked(db, id));
tf_ssb_release_db_writer(ssb, db);
tf_ssb_destroy(ssb);