Commit graph

26 commits

Author SHA1 Message Date
Guilherme Garnier
e35f97cf37
Fix "possible unprotected redirect" warning (#10511)
* Fix "possible unprotected redirect" warning

* Fix 'line too long' warning
2020-12-29 14:54:34 -05:00
Sarthak Sharma
6dee5edd0e
🚀 Ability to allow tag moderators to create chat channels (#9741)
* 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

* Merge conflict resolved

* UI completed for Create Channel

* API for create channel & invitations

* 🚀 Combining Backend and Frontend

* Test cases added

* UI completed for Create Channel

* API for create channel & invitations

* 🚀 Combining Backend and Frontend

* Test cases added

* fix suggestions

* add test cases

* replace mod_relations_admin to tag_moderator

* fix test cases

* refactor and fix code climate issues

* Update app/controllers/chat_channel_memberships_controller.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* fix suggestions

* renaming the methods

* Update app/javascript/chat/chat.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Update app/javascript/chat/components/createChatModal.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* add jsDoc and add validation

* add PR suggestions

* renmae the file name to  PascalCase

* add styled component

* refactor channel button component

* fix specs

* fix code smell issues

* fix file name issue

* handle error message

* add jsDoc

* Update app/controllers/chat_channels_controller.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* refactor chat_channel_helpers

* update old hash to new hash

* Update app/javascript/chat/components/ChannelButton.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Update app/views/chat_channels/index.html.erb

Co-authored-by: Michael Kohl <me@citizen428.net>

* fix syntax error

* Update app/views/chat_channels/index.html.erb

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* Policies changed

* The Disable Button issue 🐞

* Fixing Disabled button Issue 🐞

* New group doesn't show up 🐞

Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-12-08 13:10:36 +07:00
Molly Struve
e9761fde7c
Optimization:Dont Notify of Channel Leavings (#10518)
* Optimization:Dont Notify of Channel Leavings

* Add specs and dont send pusher notifications or mark chat channel as unread for left or removed chat actions
2020-10-02 16:19:54 +02:00
Brunno Souza
9272da5ee8
Remove exceeded line (#10290) 2020-09-17 11:28:03 -06:00
Fernando Valverde
a9441add3d
[deploy] Redirect override (#9469) 2020-07-23 10:28:28 -04:00
Fernando Valverde
7eb27328bb
[deploy] Changes expiration of invitation links to 80h (#9449) 2020-07-22 12:22:32 -04:00
narender2031
0cfc593150
[deploy] 🚀 Feature: Chat channel request manager (#9305)
* 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

* Merge conflict resolved

* request manager info API

* 👨🏼‍🎨 Design added for requestCenter

* integrate request manager with API

* remove unused argument

* fix request manager card UI

* fix request card UI

* add request manager button

* handle no invitaion UI

* fix badge UI

* add request specs

* add jest specs

* remove the presenter

* fix code climate issues

* fix queries

* fix runbocop issues

* fix PR suggestions

* remove empty lines

Co-authored-by: Sarthak Sharma <7lovesharma7@gmail.com>
2020-07-22 09:12:09 -04:00
Sarthak Sharma
3addb64326
[deploy] 🚀 Feature: Chat channel membership manager component (#8945)
* 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

* Merge conflict resolved

* fix video content issue

* add UI for membership management

* add api to update memberahip role

* add methods for manage membership

* Add integration test cases

* add emoji for admin

* Open member profile in sidecar only

* 🐞 Problem with direct channel sidecar

* 🐞 Few other UI enhancements

* fix mod typo

* add limit upto 4 for display active memberships

* fix UI issues

* fix action ui for membership

* fix sidebar redirection issue

* fix svg buttons

* add test cases

* fixed broken spec

* fix PR suggestions

* remove not used code

* fix typo

* fix PR suggestion

* fix typos

* add invitation url expiry

* fix specs

* fix PR suggestions

* removed unused gem

* remove presenter format

* handle invitation link expiry with redis

* fix PR suggestions

* user can view non-discoverable channel invitation link

* fix typos

* remove commented code

* add spacing

* PR suggestions

* remove class from button

* replace componentDidMount with commen function

* remove action button for single membership

* add chat message on update role

* add spece between lines

Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: Fernando Valverde <fdov88@gmail.com>
2020-07-20 08:08:31 -04:00
rhymes
f1ec04a0c9
Rubocop: move dot in multi-line calls to leading position (#9262) 2020-07-16 15:51:11 +02:00
rhymes
5b62811c98
[deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
rhymes
40f54e317f
[deploy] Use Action Mailer parameterized syntax (#8853) 2020-06-23 13:48:41 -05:00
narender2031
e78a0078a7
[deploy] Refactor 🚀 : Replaced Chat Channel Setting page with Preact component. (#8271)
* 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

* 🐞 Channel List bug in mobile view

* changes in joining request responses

* 🛠  Request Managers Frontend ready

* changes in routes for adding and removing remembership

* 🚀 New routes implemented for request manager

* fix issues

* changes in api for remove membership

* Merge conflict resolved

* 🐞 Channel List bug in mobile view

* changes in joining request responses

* 🛠  Request Managers Frontend ready

* changes in routes for adding and removing remembership

* 🚀 New routes implemented for request manager

* fix issues

* changes in api for remove membership

* 🛠Optimizing for CodeClimate

* 🛠Optimizing again for CodeClimate

* 🛠Optimizing again 2 for CodeClimate

* 🛠 Added more test cases

* 🛠 Optimizing code

* 🚀 Action to open setting page added

* 🛠  Dummy page added for chat setting

* add JSON routes for chat channel settings

* Integrate chat channel settings API with UI

* 🐞 Channel List bug in mobile view

* 🛠  Request Managers Frontend ready

* changes in routes for adding and removing remembership

* 🚀 New routes implemented for request manager

* fix issues

* 🐞 Channel List bug in mobile view

* 🛠  Request Managers Frontend ready

* changes in routes for adding and removing remembership

* 🚀 New routes implemented for request manager

* fix issues

* 🛠Optimizing again for CodeClimate

* 🚀 Action to open setting page added

* 🛠  Dummy page added for chat setting

* add JSON routes for chat channel settings

* Integrate chat channel settings API with UI

* Fix PR requested changes

* Add JSDoc documentation to exported functions

* fix/add rspec test cases

* refactor channelSettinngs render part

* add test cases for chat channel settings component

* fix code-climate

* add rest component tests

* add more test coverage

* fix code-climate bugs

* add API function test

Co-authored-by: Sarthak Sharma <7lovesharma7@gmail.com>
Co-authored-by: Parasgr-code <paras.gaur@skynox.tech>
2020-06-10 16:58:37 -04:00
Ernesto Tagwerker
9ea3a8c67d
Upgrade to Rails 6.0 (#7658)
* Add dual booting logic to Gemfile

This might be helpful for the Rails 6.0 upgrade project.

* Add more than one gemfile to Travis' configuration

We want to see how the application behaves with more than one Rails versions:

- Gemfile -> Rails 5.2
- Gemfile.next -> Rails 6.0

This will help us figure out what needs to be addressed before migrating to Rails 6.0.

If you want to read more about this technique (dual booting) you can check out this page: https://www.fastruby.io/blog/upgrade-rails/dual-boot/dual-boot-with-rails-6-0-beta.html

* Fix joins

* Upgrade Gemfile.next.lock

* Make sure we're installing the correct versions of gems

* Add Rails 6 notes

* Update rubocop in Gemfile.next.lock

* Fix organization spec

* Fix page_views_spec

* Add Rails 6 and run rails app:update

* Remove some tricks

* Remove Gemfile.next for now

* Fix .content_type deprecation

* Fix deprecation of .where.not NAND/NOR behavior

* Fix deprecation of parameterized emails

* Fix specs

* Remove next flag for now

* Fix spec (hopefully)

* Add wait_for_javascript

* Fix spec, thanks @maestromac!

* Try without wait for javascript hack

* Remove unnecessary bin/update

* Remove file that snuck in the rebase

* Update the vendored gems

* Replace migrate+db:setup with db:prepare

* Update vendored gems

* Fix Gemfile.lock and update vendored stuff

* Fix Gemfile.lock to be the same as master's minus the changes

Co-authored-by: rhymes <rhymesete@gmail.com>
2020-06-04 11:54:25 +02:00
Sarthak Sharma
40dc8d1349
[deploy] 🚀 Feature: Chat Channel Request manager for mods (#7904)
* 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

* 🐞 Channel List bug in mobile view

* changes in joining request responses

* 🛠  Request Managers Frontend ready

* changes in routes for adding and removing remembership

* 🚀 New routes implemented for request manager

* fix issues

* changes in api for remove membership

* Merge conflict resolved

* 🐞 Channel List bug in mobile view

* changes in joining request responses

* 🛠  Request Managers Frontend ready

* changes in routes for adding and removing remembership

* 🚀 New routes implemented for request manager

* fix issues

* changes in api for remove membership

* 🛠Optimizing for CodeClimate

* 🛠Optimizing again for CodeClimate

* 🛠Optimizing again 2 for CodeClimate

* 🛠 Added more test cases

* 🛠 Optimizing code

* 🛠 vscode file changed

* 🛠  Updated schema as requested

Co-authored-by: Parasgr-code <paras.gaur@skynox.tech>
2020-06-02 17:23:56 -04:00
Sarthak Sharma
90d60bf73f
[deploy] 🚀 Feature: Ability to search discoverable channels and send request to join (#7385)
* 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

* added new column discoverable for public channel and changes in elasticsearch

* fix corrections

* changes in serializer file, added channel_discoverable

* added checkbox with discoverable policy

* changes in code for discoverable channels

* accept and reject member invitation by mod

* add joining request to closed groups

* fixed merge error

* changes in joining member to closed groups

* join to closed group

* changes in message action of joining

* changes in chat upopened json

* 🚀Feature : Ability to search Global Channels

* touch updated_at in after commit update

* 🚀Feature : Ability to send request to discoverable channel

* 🚀Feature : Ability to send request to discoverable channel

* created new route for joining closed channel

* 🚀 Success handle on joining request sent

* removed redundant code

* join_channel improvement, removed authorization for join channel

* list of joining requests

* added joining_request status channels on search list

* changes in mailer and query builder optimized

* 🛠 Adding filter for new Query

* added rspec for add membership method in controller

* rspec for sending join channel request

* invite join request channel list rspec

* test case for query builder discoverable

* viewable and discoverable channel list

* refactored logic for search channels

* 🚀 Check if Request already sent

* 🛠 Optimizing code and making channelButton Component

* 🛠 Optimizing codefor SVG problem

* 🛠 Optimized action.js

* changes in search controller query

* hot fix

* removed unwanted code

* 🛠  Fix the Channel Name problem

* 🛠  Optimizing code further for CodeClimate

* added new column discoverable for public channel and changes in elasticsearch

* fix corrections

* changes in serializer file, added channel_discoverable

* added checkbox with discoverable policy

* changes in code for discoverable channels

* accept and reject member invitation by mod

* add joining request to closed groups

* fixed merge error

* changes in joining member to closed groups

* join to closed group

* changes in message action of joining

* changes in chat upopened json

* touch updated_at in after commit update

* 🚀Feature : Ability to search Global Channels

* 🚀Feature : Ability to send request to discoverable channel

* 🚀Feature : Ability to send request to discoverable channel

* created new route for joining closed channel

* 🚀 Success handle on joining request sent

* removed redundant code

* join_channel improvement, removed authorization for join channel

* list of joining requests

* added joining_request status channels on search list

* changes in mailer and query builder optimized

* added rspec for add membership method in controller

* rspec for sending join channel request

* invite join request channel list rspec

* 🛠 Adding filter for new Query

* test case for query builder discoverable

* viewable and discoverable channel list

* refactored logic for search channels

* 🚀 Check if Request already sent

* 🛠 Optimizing code and making channelButton Component

* 🛠 Optimizing codefor SVG problem

* 🛠 Optimized action.js

* changes in search controller query

* hot fix

* 🛠  Fix the Channel Name problem

* 🛠  Fixing merge problem

* 🛠  Optimizing code further for CodeClimate

* updated UI for membership edit

* fixed test casses and fixed UI for chat_channel_edit

* 🛠napshots added

* test cases fixed

* 🛠 Test cases added for new component

* channel settings accesible only by mod

* 🛠 More Test cases added

* 🛠 Svg code optimized

* 🛠 Svg code optimized in videocontent

* optimized code for search query

* fix test case for query builder

* changes in joining closed channel logic

* refactored join channel

* redirect to edit channel after joining request

* changes in test case for redirect

* optimized code

* 🛠 Eslint bugs fixed

* test case fixed

* optimization

* olving channel repetition problem

* optimization of code for query builder

* changes in query builder

* test cases fixed

* 🛠 Handling reduntant data on frontend

* 🛠  Don't show data if no filter query

* 🛠 Optimized code for fixing bugs and code coverage

* 🛠  Optimizing code further for CodeClimate

Co-authored-by: Parasgr-code <paras.gaur@skynox.tech>
2020-05-11 09:29:15 -04:00
Sarthak Sharma
f088a672de
[deploy] 🚀Feature: chat action messages if a member added, left or removed from the group (#7105)
* 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

* added chat action field and backend logic

* 🚀Action Messages: Someone Joins | Leaves | Removed

* chat action messages made realtion

* remove redundancy, message helper added

* 🛠  Style of action message changed

* 🔩 Specs added

Co-authored-by: Parasgr-code <paras.gaur@skynox.tech>
2020-04-08 18:14:34 -04:00
jituraj98
e2edf960dc
[deploy] Connect: move settings to sidecar iframe, improve invitations and remove experimental features (#6903)
* 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>
2020-04-01 12:13:26 -04:00
Molly Struve
9863d70b57
Remove algolia from chat channel memberships (#6323) 2020-02-27 09:59:12 -05:00
Molly Struve
e159217dce
Remove Unused ChatChannel Indexing (#5907) [deploy]
* remove unused algolia code from chat channel

* remove new chat_channel index code and unused methods
2020-02-07 12:39:59 -05:00
Maja Komel
28440d1fa1
Return NotFound error if ChatChannelMembership is not found (#5806) 2020-02-05 12:24:40 -05:00
Anna Buianova
0ecb937875 Added rubocop-rails (#3059)
* Added rubocop-rails

* Update rubocop version in the CodeClimate config
2019-06-06 09:47:57 -04:00
Ben Halpern
70580d0265
[WIP] Connect misc improvements/debugs (#2880)
* WIP Connect misc improvements/debugs

* Modify tests and update snapshots

* Change GitHub sidecar copy
2019-05-20 10:08:51 -04:00
rhymes
e588fa7ece Code cleanups (#659)
* Initial automatic cleanup with rubocop

* Fix syntax error introduced by rubocop

* Cleanup seeds file

* Cleanup lib folder

* Exclude bin folder because it contains auto generated files

* Make Rubocop a little bit more chatty

* Block length should not include comments in the count

* Cleanup config folder

* Cleanup specs

* Updated Rubocop version and generated a todo file

* Fix broken ArticlesApi spec

* Fix tests

* Restored rubocop pre-commit hook
2018-08-07 11:00:13 -04:00
Ben Halpern
57d1bc48d5
Fix navigation issue in connect and allow leaving channels (#635)
* Fix navigation issue in connect and allow leaving channels

* Fix chat channel memberships request spec
2018-07-30 18:40:30 -04:00
Ben Halpern
424be43865
Add chat_channel_membership roles and invite functionality (#541) 2018-07-03 13:16:48 -04:00
Ben Halpern
94e5154668
Add initial invitation framework for chat channels (#528)
* Add initial invitation framework for chat channels

* Update chat_channel specs

* Add DIY concept of accepting invite

* Add some js and fix spec

* Add full invite accept functionality

* Remove console.log from chat
2018-07-02 16:31:20 -04:00