monkeeShark/src/remote/activitypub/act/create.ts

11 lines
297 B
TypeScript
Raw Normal View History

2018-03-31 10:55:00 +00:00
import create from '../create';
2018-04-03 11:09:26 +00:00
import Resolver from '../resolver';
2018-03-31 10:55:00 +00:00
2018-04-03 11:09:26 +00:00
export default (resolver: Resolver, actor, activity, distribute) => {
2018-03-31 10:55:00 +00:00
if ('actor' in activity && actor.account.uri !== activity.actor) {
2018-04-01 12:24:25 +00:00
throw new Error();
2018-03-31 10:55:00 +00:00
}
2018-04-02 08:11:14 +00:00
return create(resolver, actor, activity.object, distribute);
2018-03-31 10:55:00 +00:00
};