feat: Add conversation delete feature (#11677)
<img width="1240" alt="Screenshot 2025-06-05 at 12 39 04 AM" src="https://github.com/user-attachments/assets/0071cd23-38c3-4638-946e-f1fbd11ec845" /> ## Changes Give the admins an option to delete conversation via the context menu - enable conversation deletion in routes and controller - expose delete API on conversations - add delete option in conversation context menu and integrate with card and list - implement store action and mutation for delete - update i18n with new strings fixes: https://github.com/chatwoot/chatwoot/issues/947 --------- Co-authored-by: iamsivin <iamsivin@gmail.com> Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Co-authored-by: Pranav <pranavrajs@gmail.com>
This commit is contained in:
@@ -4,7 +4,7 @@ module Enterprise::DeleteObjectJob
|
||||
end
|
||||
|
||||
def create_audit_entry(object, user, ip)
|
||||
return unless ['Inbox'].include?(object.class.to_s) && user.present?
|
||||
return unless %w[Inbox Conversation].include?(object.class.to_s) && user.present?
|
||||
|
||||
Enterprise::AuditLog.create(
|
||||
auditable: object,
|
||||
|
||||
7
enterprise/app/models/enterprise/audit/conversation.rb
Normal file
7
enterprise/app/models/enterprise/audit/conversation.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
module Enterprise::Audit::Conversation
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
audited only: [], on: [:destroy]
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user