ssb: Add an option to control whether we talk to strangers. #98

This commit is contained in:
2025-01-20 13:35:28 -05:00
parent aa04ad2dc2
commit fca5d37b7e
3 changed files with 86 additions and 4 deletions

View File

@ -524,6 +524,17 @@ bool tf_ssb_db_generate_invite(sqlite3* db, const char* id, const char* host, in
*/
bool tf_ssb_db_use_invite(sqlite3* db, const char* id);
/**
** Determine if an account is familiar, meaning it is local or within the given
** follow depth of the local accounts or we have already replicated data for
** it.
** @param db The database.
** @param id The identity.
** @param depth The follow depth.
** @return true if the account is familiar.
*/
bool tf_ssb_db_is_account_familiar(sqlite3* db, const char* id, int depth);
/**
** An SQLite authorizer callback. See https://www.sqlite.org/c3ref/set_authorizer.html for use.
** @param user_data User data registered with the authorizer.