activitypub: remove _misskey_reaction property

This property is duplicated by the `content` property so seems unnecessary.

Changelog: Removed
This commit is contained in:
Johann150 2023-02-11 17:43:44 +01:00
parent fff93c6965
commit 68bc2e314b
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1
4 changed files with 2 additions and 4 deletions

View file

@ -11,7 +11,7 @@ export default async (actor: CacheableRemoteUser, activity: ILike) => {
await extractEmojis(activity.tag || [], actor.host).catch(() => null); await extractEmojis(activity.tag || [], actor.host).catch(() => null);
return await createReaction(actor, note, activity._misskey_reaction || activity.content || activity.name).catch(e => { return await createReaction(actor, note, activity.content || activity.name).catch(e => {
if (e.id === '51c42bb4-931a-456b-bff7-e5a8a70dd298') { if (e.id === '51c42bb4-931a-456b-bff7-e5a8a70dd298') {
return 'skip: already reacted'; return 'skip: already reacted';
} else { } else {

View file

@ -36,7 +36,6 @@ export const renderActivity = (x: any): IActivity | null => {
// Misskey // Misskey
misskey: 'https://misskey-hub.net/ns#', misskey: 'https://misskey-hub.net/ns#',
'_misskey_quote': 'misskey:_misskey_quote', '_misskey_quote': 'misskey:_misskey_quote',
'_misskey_reaction': 'misskey:_misskey_reaction',
'_misskey_votes': 'misskey:_misskey_votes', '_misskey_votes': 'misskey:_misskey_votes',
'_misskey_talk': 'misskey:_misskey_talk', '_misskey_talk': 'misskey:_misskey_talk',
'isCat': 'misskey:isCat', 'isCat': 'misskey:isCat',

View file

@ -14,7 +14,6 @@ export const renderLike = async (noteReaction: NoteReaction, note: Note) => {
actor: `${config.url}/users/${noteReaction.userId}`, actor: `${config.url}/users/${noteReaction.userId}`,
object: note.uri ? note.uri : `${config.url}/notes/${noteReaction.noteId}`, object: note.uri ? note.uri : `${config.url}/notes/${noteReaction.noteId}`,
content: reaction, content: reaction,
_misskey_reaction: reaction,
} as any; } as any;
if (reaction.startsWith(':')) { if (reaction.startsWith(':')) {

View file

@ -282,7 +282,7 @@ 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; content?: string;
} }
export interface IAnnounce extends IActivity { export interface IAnnounce extends IActivity {