fix: disable email transcript for free plans (#13509)
- Block email transcript functionality for accounts without a paid plan to prevent SES abuse.
This commit is contained in:
@@ -35,7 +35,9 @@ class Api::V1::Widget::ConversationsController < Api::V1::Widget::BaseController
|
||||
end
|
||||
|
||||
def transcript
|
||||
return head :too_many_requests unless conversation.present? && conversation.account.within_email_rate_limit?
|
||||
return head :too_many_requests if conversation.blank?
|
||||
return head :payment_required unless conversation.account.email_transcript_enabled?
|
||||
return head :too_many_requests unless conversation.account.within_email_rate_limit?
|
||||
|
||||
send_transcript_email
|
||||
head :ok
|
||||
|
||||
Reference in New Issue
Block a user