refactor: 🔥 remove _misskey_reaction and _misskey_votes
BREAKING: breaks poll federation with very old Misskey versions
This commit is contained in:
parent
9a6818701f
commit
b0be07fb0a
@ -15,7 +15,7 @@ export default async (actor: CacheableRemoteUser, activity: ILike) => {
|
|||||||
return await create(
|
return await create(
|
||||||
actor,
|
actor,
|
||||||
note,
|
note,
|
||||||
activity._misskey_reaction || activity.content || activity.name,
|
activity.content || activity.name,
|
||||||
)
|
)
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
if (e.id === "51c42bb4-931a-456b-bff7-e5a8a70dd298") {
|
if (e.id === "51c42bb4-931a-456b-bff7-e5a8a70dd298") {
|
||||||
|
@ -34,7 +34,7 @@ export async function extractPollFromQuestion(
|
|||||||
);
|
);
|
||||||
|
|
||||||
const votes = question[multiple ? "anyOf" : "oneOf"]!.map(
|
const votes = question[multiple ? "anyOf" : "oneOf"]!.map(
|
||||||
(x, i) => x.replies?.totalItems || x._misskey_votes || 0,
|
(x, i) => x.replies?.totalItems || 0,
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
@ -18,7 +18,6 @@ export const renderLike = async (noteReaction: NoteReaction, note: Note) => {
|
|||||||
...(!meta.defaultReaction.includes(reaction)
|
...(!meta.defaultReaction.includes(reaction)
|
||||||
? {
|
? {
|
||||||
content: reaction,
|
content: reaction,
|
||||||
_misskey_reaction: reaction,
|
|
||||||
}
|
}
|
||||||
: {}),
|
: {}),
|
||||||
} as any;
|
} as any;
|
||||||
|
@ -158,7 +158,6 @@ export const isQuestion = (object: IObject): object is IQuestion =>
|
|||||||
interface IQuestionChoice {
|
interface IQuestionChoice {
|
||||||
name?: string;
|
name?: string;
|
||||||
replies?: ICollection;
|
replies?: ICollection;
|
||||||
_misskey_votes?: number;
|
|
||||||
}
|
}
|
||||||
export interface ITombstone extends IObject {
|
export interface ITombstone extends IObject {
|
||||||
type: "Tombstone";
|
type: "Tombstone";
|
||||||
@ -299,7 +298,6 @@ export interface IRemove extends IActivity {
|
|||||||
|
|
||||||
export interface ILike extends IActivity {
|
export interface ILike extends IActivity {
|
||||||
type: "Like" | "EmojiReaction" | "EmojiReact";
|
type: "Like" | "EmojiReaction" | "EmojiReact";
|
||||||
_misskey_reaction?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IAnnounce extends IActivity {
|
export interface IAnnounce extends IActivity {
|
||||||
|
Loading…
Reference in New Issue
Block a user