diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2019-10-29 06:01:14 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2019-10-29 06:01:14 +0900 |
| commit | 245b08b624573cf4f6cb3192995d5d4f319cbce2 (patch) | |
| tree | e9f1eb3385bdda1dee715ef77b96717267866de6 /src/remote/activitypub/models | |
| parent | Update README.md [AUTOGEN] (#5556) (diff) | |
| download | sharkey-245b08b624573cf4f6cb3192995d5d4f319cbce2.tar.gz sharkey-245b08b624573cf4f6cb3192995d5d4f319cbce2.tar.bz2 sharkey-245b08b624573cf4f6cb3192995d5d4f319cbce2.zip | |
Talk federation (#5534)
Diffstat (limited to 'src/remote/activitypub/models')
| -rw-r--r-- | src/remote/activitypub/models/note.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index eb7cd6f81a..17c3721bdb 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -23,6 +23,7 @@ import { genId } from '../../../misc/gen-id'; import { fetchMeta } from '../../../misc/fetch-meta'; import { ensure } from '../../../prelude/ensure'; import { getApLock } from '../../../misc/app-lock'; +import { createMessage } from '../../../services/messages/create'; const logger = apLogger; @@ -223,6 +224,13 @@ export async function createNote(value: string | IObject, resolver?: Resolver, s if (actor.uri) updatePerson(actor.uri); } + if (note._misskey_talk && visibility === 'specified') { + for (const recipient of visibleUsers) { + await createMessage(actor, recipient, undefined, text || undefined, (files && files.length > 0) ? files[0] : null); + return null; + } + } + return await post(actor, { createdAt: note.published ? new Date(note.published) : null, files, |