|
|
|
@ -182,14 +182,13 @@ void status_add_reply( struct status* s, struct status* child )
|
|
|
|
|
bool is_already_parent_reply = false;
|
|
|
|
|
for( int i = 0; i < s->replies.count; ++i ) {
|
|
|
|
|
if( s->replies.items[i] == child->id ) {
|
|
|
|
|
is_already_parent_reply = true;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if( !is_already_parent_reply ) {
|
|
|
|
|
int id = child->id;
|
|
|
|
|
array_append( &s->replies, sizeof(id), &id );
|
|
|
|
|
status_save(s);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int id = child->id;
|
|
|
|
|
array_append( &s->replies, sizeof(id), &id );
|
|
|
|
|
status_save(s);
|
|
|
|
|
}
|
|
|
|
|
void status_add_mention( struct status* s, int id )
|
|
|
|
|
{
|
|
|
|
@ -231,7 +230,7 @@ bool status_sync_from_activity_pub( struct status* s, struct ap_object* act )
|
|
|
|
|
struct status* parent = status_from_uri_or_fetch( act->in_reply_to );
|
|
|
|
|
if( parent ) {
|
|
|
|
|
status_make_reply_to( s, parent->id );
|
|
|
|
|
status_save(parent);
|
|
|
|
|
// DO NOT SAVE parent! This is done inside status_make_reply_to
|
|
|
|
|
status_free(parent);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|