ssb: Follow + block = block.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 9m4s

This commit is contained in:
2025-11-19 18:49:08 -05:00
parent 775fdafa63
commit 111a6c3c6e
2 changed files with 49 additions and 6 deletions

View File

@@ -639,8 +639,14 @@ void tf_ssb_test_following(const tf_test_options_t* options)
message = JS_NewObject(context); \
JS_SetPropertyStr(context, message, "type", JS_NewString(context, "contact")); \
JS_SetPropertyStr(context, message, "contact", JS_NewString(context, contact)); \
JS_SetPropertyStr(context, message, "following", follow ? JS_TRUE : JS_FALSE); \
JS_SetPropertyStr(context, message, "blocking", block ? JS_TRUE : JS_FALSE); \
if (follow) \
{ \
JS_SetPropertyStr(context, message, "following", JS_TRUE); \
} \
if (block) \
{ \
JS_SetPropertyStr(context, message, "blocking", JS_TRUE); \
} \
signed_message = tf_ssb_sign_message(ssb0, id, priv, message, NULL, 0); \
stored = false; \
tf_ssb_verify_strip_and_store_message(ssb0, signed_message, _message_stored, &stored); \
@@ -660,6 +666,11 @@ void tf_ssb_test_following(const tf_test_options_t* options)
_assert_visible(ssb0, id0, id1, true);
_assert_visible(ssb0, id0, id2, true);
_assert_visible(ssb0, id0, id3, false);
FOLLOW_BLOCK(id0, priv0, id1, false, true);
_assert_visible(ssb0, id0, id0, true);
_assert_visible(ssb0, id0, id1, false);
_assert_visible(ssb0, id0, id2, false);
_assert_visible(ssb0, id0, id3, false);
#undef FOLLOW_BLOCK