Fix: 環境変数でスタンプの最大数を指定した場合、スタンプつけるときにエラーになる問題 (#290)

This commit is contained in:
KMY(雪あすか) 2023-11-14 09:19:53 +09:00 committed by GitHub
parent c35e5872c6
commit 25adf2a8c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -18,7 +18,7 @@ class EmojiReaction < ApplicationRecord
include Paginable
EMOJI_REACTION_LIMIT = 32_767
EMOJI_REACTION_PER_ACCOUNT_LIMIT = ENV.fetch('EMOJI_REACTION_PER_ACCOUNT_LIMIT', 3)
EMOJI_REACTION_PER_ACCOUNT_LIMIT = ENV.fetch('EMOJI_REACTION_PER_ACCOUNT_LIMIT', 3).to_i
update_index('statuses', :status)