Duplicate notifications on group PM actions

Environment

Discourse Version: 2.7.0.beta3 ( 6f263653c6 )

Plugin Commit: discourse-custom-wizard 2681fe2

Other Plugins
discourse-bbcode-color
discourse-bbcode
discourse-calendar
discourse-canned-replies
discourse-chat-integration
discourse-data-explorer
(docker_manager)
procourse-static-pages

Steps to Reproduce

A couple of our wizards will, on completion, use an action to send a message to a Group. This very frequently (though not always) causes two notifications to trigger for members who are in that Group, which for those who are using email notifications, will receive two separate emails for the same submission.

Example

I’m providing the json from one of the exported wizards, as requested. I hope this is useful, but for testing purposes you’re probably going to need to either create the group or change it to something else…

[{“id”:“character_application”,“name”:“Character Application”,“save_submissions”:true,“multiple_submissions”:true,“theme_id”:1,“steps”:[{“id”:“step_1”,“title”:“Character Application”,“raw_description”:“Apply for a new character by filling out this form.”,“fields”:[{“id”:“step_1_field_1”,“label”:"",“description”:“In-game character name, including handle: (name@handle)”,“required”:true,“type”:“text”},{“id”:“step_1_field_2”,“description”:“Is this character intended for Argo (Federation) or Zenas (KDF)?”,“required”:true,“type”:“dropdown”,“content”:[{“type”:“association”,“pairs”:[{“index”:0,“key”:“1”,“key_type”:“text”,“value”:“Argo”,“value_type”:“text”,“connector”:“equal”},{“index”:1,“key”:“2”,“key_type”:“text”,“value”:“Zenas”,“value_type”:“text”,“connector”:“association”}]}]},{“id”:“step_1_field_3”,“description”:“Character’s full name:”,“required”:true,“type”:“text”},{“id”:“step_1_field_4”,“label”:"",“description”:“Character’s Rank:”,“required”:true,“type”:“text”},{“id”:“step_1_field_5”,“description”:“Character’s preferred posting / Where do you see this character fitting in with the rest of Argo?:”,“required”:true,“type”:“textarea”},{“id”:“step_1_field_12”,“description”:“If you’d like a custom URL ID for this character, please type it here. Otherwise we will randomly generate one for you. e.g. http://argo.ex-astris.net/cprofile?v=\u003ci\u003e{your character url id here}\u003c/i\u003e”,“type”:“text”},{“id”:“step_1_field_6”,“description”:“What is your character’s background in a nutshell?”,“required”:true,“type”:“textarea”},{“id”:“step_1_field_7”,“description”:“Does this character have any special skills or abilities beyond what would be expected from the average person in their species/rank/position/occupation?”,“required”:true,“type”:“textarea”},{“id”:“step_1_field_8”,“description”:“Please take a moment to review the character policy. Is your character an exception to any of the constraints?”,“required”:true,“type”:“textarea”},{“id”:“step_1_field_9”,“description”:“Do you have any long term goals or aspirations for the character?”,“required”:true,“type”:“textarea”},{“id”:“step_1_field_10”,“description”:“If your character is a non-canon alien species, please give us an overview of the species:”,“type”:“textarea”},{“id”:“step_1_field_11”,“description”:“Anything else we should know about this character?”,“type”:“textarea”}],“description”:"\u003cp\u003eApply for a new character by filling out this form.\u003c/p\u003e"}],“actions”:[{“id”:“action_1”,“run_after”:“step_1”,“type”:“send_message”,“post_builder”:true,“post_template”:"\u003cabbr\u003eIN-GAME NAME\u003c/abbr\u003e w{step_1_field_1}\n\n\u003cabbr\u003eARGO OR ZENAS\u003c/abbr\u003e w{step_1_field_2}\n\n\u003cabbr\u003eCHAR FULL NAME\u003c/abbr\u003e w{step_1_field_3}\n\n\u003cabbr\u003eCHAR RANK\u003c/abbr\u003e w{step_1_field_4}\n\n\u003cabbr\u003ePREFERRED POSTING\u003c/abbr\u003e w{step_1_field_5}\n\n\u003cabbr\u003eCUSTOM ID\u003c/abbr\u003e w{step_1_field_12}\n\n—\n\n\u003cabbr\u003eNUTSHELL HISTORY\u003c/abbr\u003e w{step_1_field_6}\n\n\u003cabbr\u003eSPECIAL SKILLS\u003c/abbr\u003e w{step_1_field_7}\n\n\u003cabbr\u003eCHARSTORY POLICY ISSUES\u003c/abbr\u003e w{step_1_field_8}\n\n\u003cabbr\u003eLONG-TERM GOALS\u003c/abbr\u003e w{step_1_field_9}\n\n\u003cabbr\u003eNON-CANON ALIEN?\u003c/abbr\u003e w{step_1_field_10}\n\n\u003cabbr\u003eANYTHING ELSE?\u003c/abbr\u003e w{step_1_field_11}",“title”:[{“type”:“assignment”,“output”:“step_1_field_1”,“output_type”:“wizard_field”,“output_connector”:“set”}],“recipient”:[{“type”:“conditional”,“output_type”:“user”,“output_connector”:“then”,“pairs”:[{“index”:0,“key”:“step_1_field_2”,“key_type”:“wizard_field”,“value”:“1”,“value_type”:“text”,“connector”:“equal”}],“output”:[“ARGO_REG”]},{“type”:“conditional”,“connector”:“or”,“output_type”:“user”,“output_connector”:“then”,“pairs”:[{“index”:0,“key”:“step_1_field_2”,“key_type”:“wizard_field”,“value”:“2”,“value_type”:“text”,“connector”:“equal”}],“output”:[“ZENAS_REG”]}]}]}]

Logs

Looking at the logs located at /admin/wizards/logs, it honestly looks like everything is in order. For messages where I received two notifications, there is only one entry that says “action: send_message;”

if there are other locations I should check, please let me know and I’ll do my best.

Hey thanks for this report. Could you download the full wizard JSON using the “Manager” and attach it here? I attempted to copy/paste the JSON you provided however that has a few formatting issues.

Hi, sorry, it won’t let me upload an attachment due to being a new user.

But looking at the exports, it’s identical to what I copy/pasted above. Is there a different process I should be using? I’m at Manager and selecting the wizard via radio button, then clicking “Export”.

Give it another shot (just changed your permissions)

38th-fleet-argo-wizards-1613808558.json (4.0 KB)

1 Like