Custom reaction (#4517)
* Custom reaction
* increase limit of reactions/delete
* リアクションの場合は OS標準の絵文字を使用 を迂回する
* カスタムリアクションを無効にする設定
* fix
* disableCustomReaction --> enableEmojiReaction
* Avoid MFM rendering
* 🎨
* 🎨
* Auto accept
* custom emoji reaction
* Improve usability
* Extract emojiRegex
* Fix
* Clean up
* 🎨
* 🎨
* toDbReaction で reaction は必須に
あとフォールバックは like に
* Clean up
* Make required
* 3eb08748fe (r266241728)
* Refactor
* Allow null
This commit is contained in:
@ -41,6 +41,13 @@ export const meta = {
|
||||
}
|
||||
},
|
||||
|
||||
enableEmojiReaction: {
|
||||
validator: $.optional.nullable.bool,
|
||||
desc: {
|
||||
'ja-JP': '絵文字リアクションを有効にするか否か'
|
||||
}
|
||||
},
|
||||
|
||||
hidedTags: {
|
||||
validator: $.optional.nullable.arr($.str),
|
||||
desc: {
|
||||
@ -351,6 +358,10 @@ export default define(meta, async (ps) => {
|
||||
set.disableGlobalTimeline = ps.disableGlobalTimeline;
|
||||
}
|
||||
|
||||
if (typeof ps.enableEmojiReaction === 'boolean') {
|
||||
set.enableEmojiReaction = ps.enableEmojiReaction;
|
||||
}
|
||||
|
||||
if (Array.isArray(ps.hidedTags)) {
|
||||
set.hidedTags = ps.hidedTags;
|
||||
}
|
||||
|
@ -70,6 +70,10 @@ export const meta = {
|
||||
type: 'boolean',
|
||||
description: 'Whether disabled GTL.',
|
||||
},
|
||||
enableEmojiReaction: {
|
||||
type: 'boolean',
|
||||
description: 'Whether enabled emoji reaction.',
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -107,6 +111,7 @@ export default define(meta, async (ps, me) => {
|
||||
disableRegistration: instance.disableRegistration,
|
||||
disableLocalTimeline: instance.disableLocalTimeline,
|
||||
disableGlobalTimeline: instance.disableGlobalTimeline,
|
||||
enableEmojiReaction: instance.enableEmojiReaction,
|
||||
driveCapacityPerLocalUserMb: instance.localDriveCapacityMb,
|
||||
driveCapacityPerRemoteUserMb: instance.remoteDriveCapacityMb,
|
||||
cacheRemoteFiles: instance.cacheRemoteFiles,
|
||||
|
@ -1,7 +1,6 @@
|
||||
import $ from 'cafy';
|
||||
import ID, { transform } from '../../../../../misc/cafy-id';
|
||||
import createReaction from '../../../../../services/note/reaction/create';
|
||||
import { validateReaction } from '../../../../../models/note-reaction';
|
||||
import define from '../../../define';
|
||||
import { getNote } from '../../../common/getters';
|
||||
import { ApiError } from '../../../error';
|
||||
@ -30,7 +29,7 @@ export const meta = {
|
||||
},
|
||||
|
||||
reaction: {
|
||||
validator: $.str.pipe(validateReaction.ok),
|
||||
validator: $.str,
|
||||
desc: {
|
||||
'ja-JP': 'リアクションの種類'
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ export const meta = {
|
||||
|
||||
limit: {
|
||||
duration: ms('1hour'),
|
||||
max: 5,
|
||||
max: 60,
|
||||
minInterval: ms('3sec')
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user