Allow groups to have conversations with other groups or users#6009
Allow groups to have conversations with other groups or users#6009microstudi merged 55 commits intodecidim:developfrom
Conversation
* Fix supported versions in SECURITY.md * Add changelog entry
* Allow to create conversations with more than one participant * Added new form param to converstation controller * Check conversation with multiple users * Clean code debugs * Added changelog file * Cleans debug code line * Fixes rubocop offenses * Fixes some js lints * Disable mentioning users with notifications disabled * Fixes a) some js linter issues b) refactor some helper methods c) added more conversation_controller_spec tests * Adds multiple participants's conversations rspec tests * Add validations for avoiding selecting users with disabled notifications for conversations * Add test for mention with disabled users * Fixes a) unused translations tags b) Fixed conversations index test * Fixes js linter issues * Fixes a) conversation form validator b) conversations controller test * Normalizes en.yml locales file * Fixes linter conversation index erb template * Add start_conversation_dialog.js to precompiler * Fixes conversation js tag dependency * Applies some PR's CR suggestions: a) Move deleteRecipient method inside anonymous function b) * Modification of name class for disabled tribute element and modification of jquery selector by javascript selector on tribute.js library * Fix users on selectable mention list shown disabled by acceptance of conversation value * Fixes multiple mention dropdown style. Adds no results translation * Normalizes locale en.yml file * Remove scope selecting only follower user due to a subsequent validation * Adds avatar to user's dropdown multi-mention, to be like mention * Fixes a) js includes b) enlights multiple mention input placeholder * Rename disabledNotifications by directMessagesEnabled field on api * Rewrite context message on conversations_spec.rb on mentioned list * Add initial comment to inform that the original file is modified to include a modification on click event * Fix lint errors * Remove defined field directMessagesEnabled from author_interface and user_group_type and change api call from input_multiple_mentions.js.es6 * Fixes some styling changes to add users to conversation modal dialog * Fixes a) unnecessary setTime function call b) change on input placeholder c) adds extra label with max users information d) some translations * Modify user presenter to return boolean on directMessagesEnabled * Add spec for directMessagesEnabled * Fix lint rubocop issues * Adds a debounce delay call to avoid api calls when keys are pressed so fast * Fixed translations en.yml lint * Adds some accessibility functionality on New Conversation modal * Fixes some lints * Update CHANGELOG.md Co-Authored-By: Ivan Vergés <ivan@platoniq.net> * Adds some more aria pattern to relate label and input elements * Update decidim-core/app/presenters/decidim/user_presenter.rb Co-Authored-By: Ivan Vergés <ivan@platoniq.net> * Fixes bad code review merge for api user presenter * Fixes linter issue Co-authored-by: Ivan Molinero <ivan.mr@coditramuntana.com> Co-authored-by: Jesús Di Bari <jesus.db@coditramuntana.com> Co-authored-by: Ivan Vergés <ivan@platoniq.net>
* Add two cta on initiative * Normalize locales * Normalize locales * Add changelog entry * Update cta redirection (#9) * erb files linting * change cta redirection to initiatives_path * Use EngineRouter main_proxy for redirection * Add two missing tests (#5) Co-authored-by: Armand Fardeau <armandfardeau@users.noreply.github.com> Co-authored-by: Quentin Champ <26109239+Quentinchampenois@users.noreply.github.com> Co-authored-by: Oliver Valls <oliver.vh@coditramuntana.com>
* Don't follow the header x forwarded host by default * Use accessor directly * Add changelog entry Co-authored-by: Oliver Valls <oliver.vh@coditramuntana.com>
* migration to remove legacy fields * fix changelog * rename migration Co-authored-by: Oliver Valls <oliver.vh@coditramuntana.com>
# Conflicts: # decidim-core/app/assets/javascripts/decidim/input_multiple_mentions.js.es6 # decidim-core/app/commands/decidim/messaging/start_conversation.rb # decidim-core/app/controllers/decidim/messaging/conversations_controller.rb # decidim-core/app/forms/decidim/messaging/conversation_form.rb # decidim-core/app/helpers/decidim/messaging/conversation_helper.rb # decidim-core/spec/system/messaging/conversations_spec.rb
|
hi @microstudi , tests in |
|
@tramuntanal , this is finished! |
There was a problem hiding this comment.
Wow! Great job @microstudi
I only left a couple of minor things 🔍
There's changelog file conflict too
| <% user_grouped_messages.each do |sender, messages| %> | ||
| <%= render "messages", sender: sender, messages: messages %> | ||
| <% end %> | ||
| <% conversation.messages.each do |message| %> |
There was a problem hiding this comment.
Could this conversation.messages.each block left over? it seems it makes an unnecessary loop with an empty code block
There was a problem hiding this comment.
indeed! good catch!
|
@Leusev it should be ok now! |
Leusev
left a comment
There was a problem hiding this comment.
Looks good for me @microstudi
Only if you could take a look at that changelog entry
Thanks!!
Leusev
left a comment
There was a problem hiding this comment.
I swear I saw it 🙄 😅
All ok now!! 😄
|
@decidim/product is this ok from your side? have you tested it? |
|
yep, checked! 👍 well done @microstudi |
|
This PR causes some test failures: https://github.com/decidim/decidim/runs/704413614 Can you check this? @microstudi |
|
Thanks @mrcasals looking at it. strange as tests where fine before merging. |
|
This seems to be a flaky test... after restart the job succeeded |
🎩 What? Why?
Allow groups to have private conversations between them and/or normal users.
It uses the multi-user messaging capabilities introduced in #5681.
Groups can start new conversations from their profile page. Normal users still maintain the independent conversation page but they can have conversations with groups too.
Notes:
There are 6 types of templates for an email sent (class
ConversationMailer) as a result of this:new_conversationnew_group_conversationcomanagers_new_conversationnew_messagenew_group_messagecomanagers_new_message📌 Related Issues
📋 Subtasks
CHANGELOGentry📷 Screenshots (optional)