Fix bug syncing mentions, fix typo, fix SEGV in apu_Status_write

master
teknomunk 1 year ago
parent a91eee9eeb
commit 9f9b93a263

@ -200,6 +200,7 @@ bool status_sync_from_activity_pub( struct status* s, struct ap_activity* act )
status_free(parent);
}
}
s->mentions.count = 0;
for( int i = 0; i < act->tags.count; ++i ) {
struct ap_activity_tag* tag = act->tags.items[i];
if( tag->type == aptag_mention ) {

@ -333,7 +333,7 @@ struct json_object_field api_Status_layout[] = {
.string_callback = render_source_callback,
},
{
.key = "crated_at",
.key = "created_at",
.required = true,
.offset = offsetof( OBJ_TYPE, published ),
.type = &json_field_date_time
@ -462,6 +462,11 @@ void api_Status_write( struct status* s, FILE* f, int indent )
.indent = indent,
};
if( !s ) {
fprintf( f, "null" );
return;
}
struct status* system_status = NULL;
if( s->stub ) {
system_status = status_new_system_stub( s );

Loading…
Cancel
Save