diff --git a/src/@types/polls.ts b/src/@types/polls.ts index 573a578c3..ae3285c79 100644 --- a/src/@types/polls.ts +++ b/src/@types/polls.ts @@ -66,25 +66,3 @@ export interface IPollEndContent extends IContent { "rel_type": string; }; } - -export function makePollContent( - question: string, - answers: string[], - kind: string, -): IPollContent { - question = question.trim(); - answers = answers.map(a => a.trim()).filter(a => !!a); - return { - [TEXT_NODE_TYPE.name]: - `${question}\n${answers.map((a, i) => `${i + 1}. ${a}`).join('\n')}`, - [POLL_START_EVENT_TYPE.name]: { - kind: kind, - question: { - [TEXT_NODE_TYPE.name]: question, - }, - answers: answers.map( - (a, i) => ({ id: `${i}-${a}`, [TEXT_NODE_TYPE.name]: a }), - ), - }, - }; -}