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