From 536277122d6c8f951114df6f7867095639343991 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 9 Apr 2018 05:02:52 +0900 Subject: [PATCH] wip --- .../activitypub/{perform => kernel}/announce/index.ts | 0 .../activitypub/{perform => kernel}/announce/note.ts | 0 src/remote/activitypub/{perform => kernel}/create/image.ts | 0 src/remote/activitypub/{perform => kernel}/create/index.ts | 0 src/remote/activitypub/{perform => kernel}/create/note.ts | 0 src/remote/activitypub/{perform => kernel}/delete/index.ts | 0 src/remote/activitypub/{perform => kernel}/delete/note.ts | 0 src/remote/activitypub/{perform => kernel}/follow.ts | 0 src/remote/activitypub/{perform => kernel}/index.ts | 0 src/remote/activitypub/{perform => kernel}/like.ts | 0 src/remote/activitypub/{perform => kernel}/undo/follow.ts | 0 src/remote/activitypub/{perform => kernel}/undo/index.ts | 0 src/remote/activitypub/perform.ts | 7 +++++++ 13 files changed, 7 insertions(+) rename src/remote/activitypub/{perform => kernel}/announce/index.ts (100%) rename src/remote/activitypub/{perform => kernel}/announce/note.ts (100%) rename src/remote/activitypub/{perform => kernel}/create/image.ts (100%) rename src/remote/activitypub/{perform => kernel}/create/index.ts (100%) rename src/remote/activitypub/{perform => kernel}/create/note.ts (100%) rename src/remote/activitypub/{perform => kernel}/delete/index.ts (100%) rename src/remote/activitypub/{perform => kernel}/delete/note.ts (100%) rename src/remote/activitypub/{perform => kernel}/follow.ts (100%) rename src/remote/activitypub/{perform => kernel}/index.ts (100%) rename src/remote/activitypub/{perform => kernel}/like.ts (100%) rename src/remote/activitypub/{perform => kernel}/undo/follow.ts (100%) rename src/remote/activitypub/{perform => kernel}/undo/index.ts (100%) create mode 100644 src/remote/activitypub/perform.ts diff --git a/src/remote/activitypub/perform/announce/index.ts b/src/remote/activitypub/kernel/announce/index.ts similarity index 100% rename from src/remote/activitypub/perform/announce/index.ts rename to src/remote/activitypub/kernel/announce/index.ts diff --git a/src/remote/activitypub/perform/announce/note.ts b/src/remote/activitypub/kernel/announce/note.ts similarity index 100% rename from src/remote/activitypub/perform/announce/note.ts rename to src/remote/activitypub/kernel/announce/note.ts diff --git a/src/remote/activitypub/perform/create/image.ts b/src/remote/activitypub/kernel/create/image.ts similarity index 100% rename from src/remote/activitypub/perform/create/image.ts rename to src/remote/activitypub/kernel/create/image.ts diff --git a/src/remote/activitypub/perform/create/index.ts b/src/remote/activitypub/kernel/create/index.ts similarity index 100% rename from src/remote/activitypub/perform/create/index.ts rename to src/remote/activitypub/kernel/create/index.ts diff --git a/src/remote/activitypub/perform/create/note.ts b/src/remote/activitypub/kernel/create/note.ts similarity index 100% rename from src/remote/activitypub/perform/create/note.ts rename to src/remote/activitypub/kernel/create/note.ts diff --git a/src/remote/activitypub/perform/delete/index.ts b/src/remote/activitypub/kernel/delete/index.ts similarity index 100% rename from src/remote/activitypub/perform/delete/index.ts rename to src/remote/activitypub/kernel/delete/index.ts diff --git a/src/remote/activitypub/perform/delete/note.ts b/src/remote/activitypub/kernel/delete/note.ts similarity index 100% rename from src/remote/activitypub/perform/delete/note.ts rename to src/remote/activitypub/kernel/delete/note.ts diff --git a/src/remote/activitypub/perform/follow.ts b/src/remote/activitypub/kernel/follow.ts similarity index 100% rename from src/remote/activitypub/perform/follow.ts rename to src/remote/activitypub/kernel/follow.ts diff --git a/src/remote/activitypub/perform/index.ts b/src/remote/activitypub/kernel/index.ts similarity index 100% rename from src/remote/activitypub/perform/index.ts rename to src/remote/activitypub/kernel/index.ts diff --git a/src/remote/activitypub/perform/like.ts b/src/remote/activitypub/kernel/like.ts similarity index 100% rename from src/remote/activitypub/perform/like.ts rename to src/remote/activitypub/kernel/like.ts diff --git a/src/remote/activitypub/perform/undo/follow.ts b/src/remote/activitypub/kernel/undo/follow.ts similarity index 100% rename from src/remote/activitypub/perform/undo/follow.ts rename to src/remote/activitypub/kernel/undo/follow.ts diff --git a/src/remote/activitypub/perform/undo/index.ts b/src/remote/activitypub/kernel/undo/index.ts similarity index 100% rename from src/remote/activitypub/perform/undo/index.ts rename to src/remote/activitypub/kernel/undo/index.ts diff --git a/src/remote/activitypub/perform.ts b/src/remote/activitypub/perform.ts new file mode 100644 index 0000000000..2e4f53adf5 --- /dev/null +++ b/src/remote/activitypub/perform.ts @@ -0,0 +1,7 @@ +import { Object } from './type'; +import { IRemoteUser } from '../../models/user'; +import kernel from './kernel'; + +export default async (actor: IRemoteUser, activity: Object): Promise => { + await kernel(actor, activity); +};