refactor: 🔥 remove _misskey_reaction and _misskey_votes

BREAKING: breaks poll federation with very old Misskey versions
This commit is contained in:
ThatOneCalculator 2023-09-20 21:16:03 -07:00
parent 9a6818701f
commit b0be07fb0a
No known key found for this signature in database
GPG key ID: 8703CACD01000000
4 changed files with 2 additions and 5 deletions

View file

@ -15,7 +15,7 @@ export default async (actor: CacheableRemoteUser, activity: ILike) => {
return await create(
actor,
note,
activity._misskey_reaction || activity.content || activity.name,
activity.content || activity.name,
)
.catch((e) => {
if (e.id === "51c42bb4-931a-456b-bff7-e5a8a70dd298") {

View file

@ -34,7 +34,7 @@ export async function extractPollFromQuestion(
);
const votes = question[multiple ? "anyOf" : "oneOf"]!.map(
(x, i) => x.replies?.totalItems || x._misskey_votes || 0,
(x, i) => x.replies?.totalItems || 0,
);
return {

View file

@ -18,7 +18,6 @@ export const renderLike = async (noteReaction: NoteReaction, note: Note) => {
...(!meta.defaultReaction.includes(reaction)
? {
content: reaction,
_misskey_reaction: reaction,
}
: {}),
} as any;

View file

@ -158,7 +158,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";
@ -299,7 +298,6 @@ export interface IRemove extends IActivity {
export interface ILike extends IActivity {
type: "Like" | "EmojiReaction" | "EmojiReact";
_misskey_reaction?: string;
}
export interface IAnnounce extends IActivity {