* Feature 🚀 : Ability to delete messages in chat channels
- Sending message ID to frontend
- Deleting Message
- Use pusher to delete message realtime
* Minor Bug 🐞: Show message action only for current user
- User can delete or edit their own messages
* Test cases added
* Bug 🐞: Update message id for receiver
Message id was not sent to receiver by pusher
* Refactoring🛠: Message controller refactoring
* Test Cases📝 : Specs for Delete message added
* Feature 🚀 : Ability to edit messages
* Test Cases📝 : Specs for Edit message added
* Move channel settings to sidecar
* added spec for chat_channels_memberships_controller.rb (#6539)
* added spec for chat_channels_memberships_controller.rb
* simplified record not found error for membership
* error message formatting updated
* added error key in flash message
Co-authored-by: jitendra <jitendrarajpurohit@skynox.tech>
* Refining "Move sidecar to iframe" branch (#6634)
* added spec for chat_channels_memberships_controller.rb
* simplified record not found error for membership
* error message formatting updated
* added error key in flash message
* 🐞 Bug Fix: Open sidecar of clicking @all
* 🐞 Bug Fix: adding space after selecting the username from suggestion box
* added remove channel member functionality for moderators
* 🔩 Small Tweaks: Hover issue fixed
* 🐞 Bug Fix: Remove sidecar toggle on @all tag (for now)
* updated manually constructed urls with rails path helpers
* mod users cannot remove members of other channel
Co-authored-by: jitendra <jitendrarajpurohit@skynox.tech>
* 🚀 Finalising the connect group/channel feature. (#6829)
* added spec for chat_channels_memberships_controller.rb
* simplified record not found error for membership
* error message formatting updated
* added error key in flash message
* 🐞 Bug Fix: Open sidecar of clicking @all
* 🐞 Bug Fix: adding space after selecting the username from suggestion box
* added remove channel member functionality for moderators
* 🔩 Small Tweaks: Hover issue fixed
* 🐞 Bug Fix: Remove sidecar toggle on @all tag (for now)
* updated manually constructed urls with rails path helpers
* mod users cannot remove members of other channel
* mod members can now invite user who have left the channel
* 🐞 Bug Fix: Ability to open sidecar on mention all properly
* Eslint Changes
* send email notification on inviting user feature added
* 🛠 Email design enhancements for channel invitation
* send invitation to mod user added from internal
* 🛠 Gif changes for Mod
* spec fixed
* inviter name issue fixed
* 🚀 Open sidecar when automatically if you use link from email
Co-authored-by: jitendra <jitendrarajpurohit@skynox.tech>
* review changes
* added spec for channel_invite_email
* Bug🐞: Design problem with sidecar after merge
* Bug🐞: Design problem with invitation alert box
* replaced instance variables with local variable
* Bug🐞: Wrong css classes fixed
* Bug🐞: Edit option bug
* yarn.lock file updated
* code review changes
* updated manually constructed urls with rails path helpers in spec
* user name url issue fix in invite email
* user url corrected
Co-authored-by: Sarthak Sharma <7lovesharma7@gmail.com>
Co-authored-by: benhalpern <bendhalpern@gmail.com>
* Add audit logging for negative reactions
This change saves requests that create negative reactions to the audit
log. We need to be monitoring admin and moderator actions throughout the
app to increase visiblity on how our tools are being used and identify
abuse.
Additionally, this will help east concerns about giving elevated users
more powerful tools.
* Add a basic UI for moderator audit logs
* Log experience level ratings
* Log tag adjustments
* UI tweaks for moderator actions log
* Add logging to internal reactions controller
* Add logging for admin actions on users and articles
* Add searching to the moderator actions table
* Move audit instrumentation out of concern
We are able to use a PORO here instead of using a Rails concern. Moving
this also makes syntax to audit something quite a bit more explicit and
obvious to future developers
* Change moderator logs pagination page length
* Move auditing to after action filters
* Add moderator actions to the internal navbar
* Add request spec for internal moderator actions
* Use request params to populate AuditLog slug
After looking at this UI in production, I realized that showing only
five negative reactions per page was way too few! Bumping this up to 25
which I feel is more reasonable.
* Add a table for moderator reactions
This is a simplified version of a feature that should be fleshed out
in the near future.
Despite the fact that this project is taking a new direction, I think
this table could be useful in the meantime.
* Add specs for internal mod actions view
* Rename mod actions to negative reactions
* Add Slack::Announcer and SlackClient
* Add Slack::Messengers::Feedback class
* Use Slack::Messengers::Feedback and refactor test
* Should not raise an error if params are nil, let the job fail
* Add Slack::Messengers::Sponsorship
* Rename spec
* Use Slack::Messengers::Sponsorship
* Add Slack::Messengers::PotentialSpammer
* Use Slack::Messengers::PotentialSpammer
* Add Slack::Messengers::RateLimit and use it
* Refactor a bit and improve tests
* Add Slack::Messengers::Note and use it
* Use Slack::Announcer and fix spec
* Fix specs
* Update app/services/slack/announcer.rb
Co-Authored-By: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Implement review suggestions
* Empty commit to trigger Travis
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
* Create primary_sticker_image_url in SiteConfig
* Adding test for updating primary_sticker_image_url
* typo
Co-authored-by: Ben Halpern <bendhalpern@gmail.com>
* Add internal response template controller
* Add response template policy and spec
* Add response template views for internal
* Add missing html oops, and some padding
* Use arrays instead of %w because spaces
* Link to user in index list
* Add actual HTML oops
* Allow success flash to be displayed
* Add tag moderator trait
* Remove unnecessary .all
* Use constant to avoid duplication
* Use URL helpers over manual string URLs
* Use appropriate renders and URLs
* Follow conventional CRUD and use form_with
* Add internal request spec for response_templates
* Add missing view file oops
* Use table view for index and bootstrap styles
* Redirect to index after create
* Use clearer messaging for labels
* Validate email types to use only plain text and html
* Add a mascot_user_id to SiteConfig
Also allow it to be updated from /internal/config pages.
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Add spec for updating mascot_user_id
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
* Custom social preview template for tags
* Added index on tags social_preview_template + small refactoring
* Add checks if index exists to tags migration
* Use active in place of sent on internal broadcast routes
* Add and use active scope on broadcasts
* Update seeds + specs to use active broadcasts
* Add note about active broadcasts to /internal/broadcasts page
* Changed sidebar campaign view
* feat: update the hml of the campaign sidebar config (do not show broken image if the link has not been set)
* feat: update the html and css to make it look like Figma
* chore: revert the classname change as we use write elsewhere
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* Add UI to vomit on a user from /mod
Co-authored-by: MichaelaHunter <michaela1234@gmail.com>
* Add backend tweaks for vomitting on users
Co-authored-by: Andy Zhao <17884966+Zhao-Andy@users.noreply.github.com>
* Validate that users can't moderate articles
* Add system spec for article mod page
* Satisfy rubocop after rebase
* Fix typo and formatting
* Use reactable_id instead of user_id
Co-authored-by: Michaela Hunter <60361569+MichaelaHunter@users.noreply.github.com>
Co-authored-by: Andy Zhao <17884966+Zhao-Andy@users.noreply.github.com>
* feat: port over changes (+ suggestions) from https://github.com/thepracticaldev/dev.to/pull/5892/files
* chore: add query over multiple lines
* refactor: move the sql logic into the controller instead of in the template
* chore: appease code climate
* Add sink user service and specs for mass vomits
* Use new score calculation
* Lower articles' scores instead and make async
* Add lower score functionality to controllers
* Remove unused variable
* Use correct var and add missing arg
* Remove unused status
* Add composite index for reactable_type and ID
* Use alias instead of additional boolean
* Use medium priority for sink worker
* Log to honeybadger and not logs
* Log the error and not a string
Bullet doesn't seem to like this, and it makes sense because we don't
want to load ALL reactions, just some of them.
Co-authored-by: nspinazz89 <nspinazz89@gmail.com>
Co-authored-by: Nick S <nspinazz89@gmail.com>
Allowing ids to be mutated by admins from the /internal/config pages is dangerous.
This could cause issues if an admin tries to update the SiteConfig.staff_user_id to an id that is another user's id, or to an id that isn't valid.
* Improve dropdown UX for internal/badges
Add a "blank" option to the dropdown to list of badges on internal/badges route.
Also add some checks to handle if an admin accidentally tries to award a "blank" badge.
* Ensure error is surfaced as flash message
* Add gem Ransack 2.3.0
* Add sorting and search to internal/reports
The UI here should probably be revisited sooner or later, I feel like
the vomit reactions might even need to be moved to their own view.
* Add system spec for internal reports search
* Remove filter for report_type
* Add a default message to badge award action
Because:
- The only badges routinely awarded manually use the same message
- Right now, unfriendly/unsafe UI can result in an error notification
The only badges that are currently awarded manually (afaik) have the
message "Congrats!!!" so for the time being, if a message is not
supplied to the UI, it will simply use the "Congrats!!!" message as a
default.
That being said, I'm not totally convinced this message won't work for
the long term. Generally, if we are awarding badges by hand, I'd imagine
we'd want a specific message explaining why we are doing that, or just
be okay with "Congrats!"
After talking with Peter about it, the longer term goal should be to
move badge messages into the database so they can be modified in the app
and not hardcoded. That also make sense regarding the effort to
genericize the app eventually.
* Test Badge notifications
* Add view for managing organizations
This adds only an index and show action for the internal/organizations
page. Eventually we'll flesh this out with features to automate the more
mechanical org management tasks.
* Use instance variable for search query
* Convert multiple expects into one
* Add pagination to organizations
* Add search spec for organizations
* Use size over count
* Move admin specs
These tests should probably be grouped together, so I moved them into a
directory called "internal"
This also encourages some additional internal tests.
* Add an internal badges controller
* Add internal view for running BadgeRewarder task
Because:
- Peter is currently running this rake task from Heroku and this is
going to make his workflow easier
- It's a step towards having a decent tool under internal for managing
badges (though I'd hesitate to call this decent)
This change adds a view and controller action to award badges in
batches, it's an improvment over the current workflow that Peter is
using, but it's still very rough around the edges.
We could definitely improve this with some error handling around the way
the BadgeRewarder works, but for now this is a net gain over how Peter
has been doing this task. I think it's worth merging as is and future
work to improve the experience and reliability of this tool can be
prioritized against other tasks.
* Add a trait for single_resource_admins to users factory
* Add single_resource_admin authrization for Growth view
* Expand GrowthController test coverage
* Add single resource admin workaround to models
* Add single resource admin to additional views
* Add rate_limit_follow_count_daily to SiteConfig
* Add favicon_url to SiteConfig
* Add logo_svg to SiteConfig
* Add staff_user_id to SiteConfig
* Add default_site_email to SiteConfig
* Add social_networks_handle to SiteConfig
* Add ga_view_id and ga_fetch_rate to SiteConfig
* Add mailchimp newsletters IDs to SiteConfig
* Add periodic_email_digest_max, periodic_email_digest_min to SiteConfig