1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-11-01 15:45:58 +09:00

Merge pull request #1378 from akihikodaki/misc

This commit is contained in:
syuilo 2018-04-03 12:27:56 +09:00 committed by GitHub
commit b4833d551e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View File

@ -5,6 +5,7 @@ import Post, { pack } from '../../models/post';
import User, { isLocalUser } from '../../models/user';
import stream, { publishChannelStream } from '../../publishers/stream';
import context from '../../remote/activitypub/renderer/context';
import renderCreate from '../../remote/activitypub/renderer/create';
import renderNote from '../../remote/activitypub/renderer/note';
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 => {
rendered['@context'] = context;
return request(user, following.follower[0].account.inbox, rendered);
return renderNote(user, post).then(note => {
const create = renderCreate(note);
create['@context'] = context;
return request(user, following.follower[0].account.inbox, create);
});
})))
);

View File

@ -0,0 +1,4 @@
export default object => ({
type: 'Create',
object
});