summaryrefslogtreecommitdiff
path: root/src/remote/activitypub/renderer/question.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-11-12 02:02:25 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-11-12 02:02:25 +0900
commit0e4a111f81cceed275d9bec2695f6e401fb654d8 (patch)
tree40874799472fa07416f17b50a398ac33b7771905 /src/remote/activitypub/renderer/question.ts
parentupdate deps (diff)
downloadmisskey-0e4a111f81cceed275d9bec2695f6e401fb654d8.tar.gz
misskey-0e4a111f81cceed275d9bec2695f6e401fb654d8.tar.bz2
misskey-0e4a111f81cceed275d9bec2695f6e401fb654d8.zip
refactoring
Resolve #7779
Diffstat (limited to 'src/remote/activitypub/renderer/question.ts')
-rw-r--r--src/remote/activitypub/renderer/question.ts23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/remote/activitypub/renderer/question.ts b/src/remote/activitypub/renderer/question.ts
deleted file mode 100644
index 246d599bab..0000000000
--- a/src/remote/activitypub/renderer/question.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import config from '@/config/index';
-import { User } from '@/models/entities/user';
-import { Note } from '@/models/entities/note';
-import { Poll } from '@/models/entities/poll';
-
-export default async function renderQuestion(user: { id: User['id'] }, note: Note, poll: Poll) {
- const question = {
- type: 'Question',
- id: `${config.url}/questions/${note.id}`,
- actor: `${config.url}/users/${user.id}`,
- content: note.text || '',
- [poll.multiple ? 'anyOf' : 'oneOf']: poll.choices.map((text, i) => ({
- name: text,
- _misskey_votes: poll.votes[i],
- replies: {
- type: 'Collection',
- totalItems: poll.votes[i]
- }
- }))
- };
-
- return question;
-}