Fix minor bugs

master
teknomunk 1 year ago
parent 1c1df8270c
commit c6f8df2244

@ -47,6 +47,8 @@ bool route_announce( struct ap_activity* act )
status_save_new(s);
status_add_to_timeline( original_post, original_post->account_id );
status_add_to_timeline( s, home_timeline_id );
status_add_to_timeline( s, public_timeline_id );
status_add_to_timeline( s, actor_account->id );

@ -49,6 +49,9 @@ bool account_sync_from_activity_pub( unsigned int account_id )
a->account_type = at_remote_activity_pub;
a->account_url = strdup(obj->url);
a->inbox = strdup(obj->inbox);
if( obj->summary ) {
a->note = strdup(obj->summary);
}
if( obj->endpoints.shared_inbox ) {
a->shared_inbox = strdup(obj->endpoints.shared_inbox);
}

@ -284,6 +284,7 @@ bool status_sync_from_activity_pub( struct status* s, struct ap_object* act )
}
status_save(s);
status_add_to_timeline( s, a->id );
result = true;
cleanup:
account_free(a);
@ -438,14 +439,14 @@ struct status* status_new_system_stub( struct status* stub )
s = malloc(sizeof(*s));
memset(s,0,sizeof(*s));
s->id = -stub->id - 50;
s->id = stub->id; //-stub->id - 50;
s->account_id = -1;
s->published = time(NULL);
asprintf( &s->content, "Unable to load status #%d. View on original server at <a href='%s'>%s</a>",
stub->id,
stub->url, stub->url
);
s->sensitive = true;
s->sensitive = false;
return s;
}

Loading…
Cancel
Save