Rename sequence_before_author => flags. #29

This commit is contained in:
2024-03-13 19:40:09 -04:00
parent 9de33d06d2
commit 537a8654fa
5 changed files with 50 additions and 41 deletions

View File

@ -70,12 +70,12 @@ typedef void(tf_ssb_db_store_message_callback_t)(const char* id, bool stored, vo
** @param id The message identifier.
** @param val The message object.
** @param signature The signature of the message.
** @param sequence_before_author The order of the message fields.
** @param flags tf_ssb_message_flags_t describing the message.
** @param callback A callback to call upon completion.
** @param user_data User data for the callback.
*/
void tf_ssb_db_store_message(tf_ssb_t* ssb, JSContext* context, const char* id, JSValue val, const char* signature, bool sequence_before_author,
tf_ssb_db_store_message_callback_t* callback, void* user_data);
void tf_ssb_db_store_message(
tf_ssb_t* ssb, JSContext* context, const char* id, JSValue val, const char* signature, int flags, tf_ssb_db_store_message_callback_t* callback, void* user_data);
/**
** A function called when a block is stored in the database.
@ -233,10 +233,10 @@ bool tf_ssb_db_identity_get_private_key(tf_ssb_t* ssb, const char* user, const c
** @param hash The hash type (probably "sha256").
** @param content The message content.
** @param signature The signature of the message.
** @param sequence_before_author The order of the message fields (prefer false).
** @param flags tf_ssb_message_flags_t describing the message.
*/
JSValue tf_ssb_format_message(JSContext* context, const char* previous, const char* author, int64_t sequence, double timestamp, const char* hash, const char* content,
const char* signature, bool sequence_before_author);
JSValue tf_ssb_format_message(
JSContext* context, const char* previous, const char* author, int64_t sequence, double timestamp, const char* hash, const char* content, const char* signature, int flags);
/** Information about a single followed account. */
typedef struct _tf_ssb_following_t