|
|
|
@ -292,21 +292,19 @@ struct ap_object* activity_create_Note( struct status* s )
|
|
|
|
|
char* str = strdup("https://www.w3.org/ns/activitystreams#Public");
|
|
|
|
|
array_append( &act->to, sizeof(str), &str );
|
|
|
|
|
|
|
|
|
|
for( int i = 0; i < s->media.count; ++i ) {
|
|
|
|
|
struct media* m = media_from_local_uri( s->media.items[i] );
|
|
|
|
|
if( m ) {
|
|
|
|
|
struct ap_object* att;
|
|
|
|
|
att = malloc(sizeof(*att));
|
|
|
|
|
memset(att,0,sizeof(*att));
|
|
|
|
|
|
|
|
|
|
att->type = ap_Document;
|
|
|
|
|
att->url = strdup(s->media.items[i]);
|
|
|
|
|
att->media_type = strdup(m->content_type);
|
|
|
|
|
att->name = strdup("");
|
|
|
|
|
|
|
|
|
|
array_append( &act->attachments, sizeof(att), &att );
|
|
|
|
|
}
|
|
|
|
|
media_free(m);
|
|
|
|
|
for( int i = 0; i < s->media2.count; ++i ) {
|
|
|
|
|
struct media* m = s->media2.items[i];
|
|
|
|
|
|
|
|
|
|
struct ap_object* att;
|
|
|
|
|
att = malloc(sizeof(*att));
|
|
|
|
|
memset(att,0,sizeof(*att));
|
|
|
|
|
|
|
|
|
|
att->type = ap_Document;
|
|
|
|
|
att->url = strdup(m->remote_url);
|
|
|
|
|
att->media_type = strdup(m->content_type);
|
|
|
|
|
att->name = strdup("");
|
|
|
|
|
|
|
|
|
|
array_append( &act->attachments, sizeof(att), &att );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
for( int i = 0; i < s->emoji.count; ++i ) {
|
|
|
|
|