自分のノートにリアクションを押せるように (#6506)

* resolve #6468

* リモートから来たセルフリアクションの対応
This commit is contained in:
Xeltica 2020-07-30 20:28:35 +09:00 committed by GitHub
parent f5d43b1f25
commit 71878f93e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 20 deletions

View file

@ -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;
});