From 5deff6c6404fc4fb8c257e47dce9278fa96d27a9 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Mon, 1 Jul 2024 10:25:56 +0200 Subject: [PATCH] FIX: send_message target may be a string See https://coop.pavilion.tech/t/custom-wizard-pm-access-and-send-copy-of-submission-for-guest-users/3600 --- lib/custom_wizard/action.rb | 2 +- plugin.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/custom_wizard/action.rb b/lib/custom_wizard/action.rb index d3109a22..9fe725e7 100644 --- a/lib/custom_wizard/action.rb +++ b/lib/custom_wizard/action.rb @@ -119,7 +119,7 @@ class CustomWizard::Action params[:target_group_names] = [] params[:target_usernames] = [] - targets.each do |target| + [*targets].each do |target| if Group.find_by(name: target) params[:target_group_names] << target elsif User.find_by_username(target) diff --git a/plugin.rb b/plugin.rb index dd33374c..3358fe97 100644 --- a/plugin.rb +++ b/plugin.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true # name: discourse-custom-wizard # about: Forms for Discourse. Better onboarding, structured posting, data enrichment, automated actions and much more. -# version: 2.7.0 +# version: 2.7.1 # authors: Angus McLeod, Faizaan Gagan, Robert Barrow, Keegan George, Kaitlin Maddever, Juan Marcos Gutierrez Ramos # url: https://github.com/paviliondev/discourse-custom-wizard # contact_emails: development@pavilion.tech