forked from FoundKeyGang/FoundKey
activitypub: remove _misskey_votes property
This is a duplication of `replies.totalItems` and seems unnecessary, it is even only parsed by Misskey if the afforementioned property is not available. Changelog: Removed
This commit is contained in:
parent
68bc2e314b
commit
b8796cb1fa
4 changed files with 1 additions and 4 deletions
|
@ -23,7 +23,7 @@ export async function extractPollFromQuestion(source: string | IObject, resolver
|
|||
.map(x => x.name!);
|
||||
|
||||
const votes = question[multiple ? 'anyOf' : 'oneOf']!
|
||||
.map(x => x.replies && x.replies.totalItems || x._misskey_votes || 0);
|
||||
.map(x => x.replies && x.replies.totalItems || 0);
|
||||
|
||||
return {
|
||||
choices,
|
||||
|
|
|
@ -36,7 +36,6 @@ export const renderActivity = (x: any): IActivity | null => {
|
|||
// Misskey
|
||||
misskey: 'https://misskey-hub.net/ns#',
|
||||
'_misskey_quote': 'misskey:_misskey_quote',
|
||||
'_misskey_votes': 'misskey:_misskey_votes',
|
||||
'_misskey_talk': 'misskey:_misskey_talk',
|
||||
'isCat': 'misskey:isCat',
|
||||
// vcard
|
||||
|
|
|
@ -11,7 +11,6 @@ export default async function renderQuestion(user: { id: User['id'] }, note: Not
|
|||
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],
|
||||
|
|
|
@ -171,7 +171,6 @@ export const isQuestion = (object: IObject): object is IQuestion =>
|
|||
interface IQuestionChoice {
|
||||
name?: string;
|
||||
replies?: ICollection;
|
||||
_misskey_votes?: number;
|
||||
}
|
||||
export interface ITombstone extends IObject {
|
||||
type: 'Tombstone';
|
||||
|
|
Loading…
Reference in a new issue