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:
Johann150 2023-02-11 17:49:12 +01:00
parent 68bc2e314b
commit b8796cb1fa
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
4 changed files with 1 additions and 4 deletions

View file

@ -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,

View file

@ -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

View file

@ -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],

View file

@ -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';