diff --git a/src/client/components/note.vue b/src/client/components/note.vue index a359287b4..69ab4ae44 100644 --- a/src/client/components/note.vue +++ b/src/client/components/note.vue @@ -71,10 +71,10 @@ - + - + diff --git a/src/client/components/reactions-viewer.reaction.vue b/src/client/components/reactions-viewer.reaction.vue index 639a1603c..763f4e9e9 100644 --- a/src/client/components/reactions-viewer.reaction.vue +++ b/src/client/components/reactions-viewer.reaction.vue @@ -51,11 +51,8 @@ export default Vue.extend({ }; }, computed: { - isMe(): boolean { - return this.$store.getters.isSignedIn && this.$store.state.i.id === this.note.userId; - }, canToggle(): boolean { - return !this.reaction.match(/@\w/) && !this.isMe && this.$store.getters.isSignedIn; + return !this.reaction.match(/@\w/) && this.$store.getters.isSignedIn; }, }, watch: { diff --git a/src/remote/activitypub/kernel/like.ts b/src/remote/activitypub/kernel/like.ts index a87711030..a6f02a1f8 100644 --- a/src/remote/activitypub/kernel/like.ts +++ b/src/remote/activitypub/kernel/like.ts @@ -9,8 +9,6 @@ export default async (actor: IRemoteUser, activity: ILike) => { const note = await fetchNote(targetUri); if (!note) return `skip: target note not found ${targetUri}`; - if (actor.id === note.userId) return `skip: cannot react to my note`; - await extractEmojis(activity.tag || [], actor.host).catch(() => null); await create(actor, note, activity._misskey_reaction || activity.content || activity.name); diff --git a/src/server/api/endpoints/notes/reactions/create.ts b/src/server/api/endpoints/notes/reactions/create.ts index 6abc7e305..9017d9f36 100644 --- a/src/server/api/endpoints/notes/reactions/create.ts +++ b/src/server/api/endpoints/notes/reactions/create.ts @@ -40,12 +40,6 @@ export const meta = { id: '033d0620-5bfe-4027-965d-980b0c85a3ea' }, - isMyNote: { - message: 'You can not react to your own notes.', - code: 'IS_MY_NOTE', - id: '7eeb9714-b047-43b5-b559-7b1b72810f53' - }, - alreadyReacted: { message: 'You are already reacting to that note.', code: 'ALREADY_REACTED', @@ -60,7 +54,6 @@ export default define(meta, async (ps, user) => { throw e; }); await createReaction(user, note, ps.reaction).catch(e => { - if (e.id === '2d8e7297-1873-4c00-8404-792c68d7bef0') throw new ApiError(meta.errors.isMyNote); if (e.id === '51c42bb4-931a-456b-bff7-e5a8a70dd298') throw new ApiError(meta.errors.alreadyReacted); throw e; }); diff --git a/src/services/note/reaction/create.ts b/src/services/note/reaction/create.ts index f3637352c..bfa95b087 100644 --- a/src/services/note/reaction/create.ts +++ b/src/services/note/reaction/create.ts @@ -15,11 +15,6 @@ import { createNotification } from '../../create-notification'; import deleteReaction from './delete'; export default async (user: User, note: Note, reaction?: string) => { - // Myself - if (note.userId === user.id) { - throw new IdentifiableError('2d8e7297-1873-4c00-8404-792c68d7bef0', 'cannot react to my note'); - } - reaction = await toDbReaction(reaction, user.host); const exist = await NoteReactions.findOne({