discord: rename DiscordApiClient to DiscordWebhookService.

This commit is contained in:
evazion
2021-03-10 23:36:40 -06:00
parent 7bdec9b5fa
commit 1c2f3abe56
2 changed files with 5 additions and 2 deletions

View File

@@ -1,4 +1,7 @@
class DiscordApiClient
# Used for posting notifications to Discord about new forum posts.
# https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks
class DiscordWebhookService
attr_reader :webhook_id, :webhook_secret, :http
def initialize(webhook_id: Danbooru.config.discord_webhook_id, webhook_secret: Danbooru.config.discord_webhook_secret, http: Danbooru::Http.new)

View File

@@ -167,7 +167,7 @@ class ForumPost < ApplicationRecord
def send_discord_notification
return unless policy(User.anonymous).show?
DiscordApiClient.new.post_message(self)
DiscordWebhookService.new.post_message(self)
end
def build_response