ssb: Invite support progress. Now the pub accepts the invite, tracks its use, and follows. The client still needs to react.

This commit is contained in:
2025-01-19 17:02:08 -05:00
parent faca63946c
commit 616f3ad76d
3 changed files with 163 additions and 6 deletions

View File

@ -516,6 +516,14 @@ const char* tf_ssb_db_get_profile_name(sqlite3* db, const char* id);
*/
bool tf_ssb_db_generate_invite(sqlite3* db, const char* id, const char* host, int port, int use_count, int expires_seconds, char* out_invite, size_t size);
/**
** Consume and validate an invite.
** @param db The database.
** @param id The invite public key.
** @return true If the invite was valid and successfully consumed.
*/
bool tf_ssb_db_use_invite(sqlite3* db, const char* id);
/**
** An SQLite authorizer callback. See https://www.sqlite.org/c3ref/set_authorizer.html for use.
** @param user_data User data registered with the authorizer.