mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-15 17:35:44 +01:00
Merge pull request #1378 from akihikodaki/misc
This commit is contained in:
commit
b4833d551e
2 changed files with 9 additions and 3 deletions
|
@ -5,6 +5,7 @@ import Post, { pack } from '../../models/post';
|
||||||
import User, { isLocalUser } from '../../models/user';
|
import User, { isLocalUser } from '../../models/user';
|
||||||
import stream, { publishChannelStream } from '../../publishers/stream';
|
import stream, { publishChannelStream } from '../../publishers/stream';
|
||||||
import context from '../../remote/activitypub/renderer/context';
|
import context from '../../remote/activitypub/renderer/context';
|
||||||
|
import renderCreate from '../../remote/activitypub/renderer/create';
|
||||||
import renderNote from '../../remote/activitypub/renderer/note';
|
import renderNote from '../../remote/activitypub/renderer/note';
|
||||||
import request from '../../remote/request';
|
import request from '../../remote/request';
|
||||||
|
|
||||||
|
@ -49,9 +50,10 @@ export default ({ data }) => Post.findOne({ _id: data.id }).then(post => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return renderNote(user, post).then(rendered => {
|
return renderNote(user, post).then(note => {
|
||||||
rendered['@context'] = context;
|
const create = renderCreate(note);
|
||||||
return request(user, following.follower[0].account.inbox, rendered);
|
create['@context'] = context;
|
||||||
|
return request(user, following.follower[0].account.inbox, create);
|
||||||
});
|
});
|
||||||
})))
|
})))
|
||||||
);
|
);
|
||||||
|
|
4
src/remote/activitypub/renderer/create.ts
Normal file
4
src/remote/activitypub/renderer/create.ts
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
export default object => ({
|
||||||
|
type: 'Create',
|
||||||
|
object
|
||||||
|
});
|
Loading…
Reference in a new issue