DEV: Replace #pluck_first monkey patch with native #pick (#166)

This commit is contained in:
Ted Johansson 2023-05-09 10:47:42 +08:00 committed by GitHub
parent 9647c7afc0
commit 481dc797a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -199,7 +199,7 @@ module DiscourseChatIntegration::Provider::SlackProvider
def self.get_slack_thread_ts(topic, channel)
field = TopicCustomField.where(topic: topic, name: "#{THREAD_CUSTOM_FIELD_PREFIX}#{channel}")
field.pluck_first(:value) || topic.custom_fields[THREAD_LEGACY]
field.pick(:value) || topic.custom_fields[THREAD_LEGACY]
end
def self.set_slack_thread_ts(topic, channel, value)