New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement open inbox for dev-connect #1563
Conversation
- generated a migration - added open_inbox as a permitted attribute - added checkbox in settings/profile to indicate whether user is open to messages from anyone - added indicator "i'm open to chatting" on profile to test attribute
|
Looks good so far. A future thoughts/headsup:
Good luck, this will be awesome! |
- changed column name, type and default value - setttings/profile inbox menu has options select now -- can add more inbox types in the future
- link to open_chat is displayed if either the user's inbox type is open or if the user and current user follow each other - open_chat checks if a chat channel exists between the two users and makes a channel if not and redirects to connect with the users slug
|
@benhalpern I just updated the PR description and screenshots. There's some |
|
Refactored how mutual checks are done by extending If you unfollow a mutually followed user, the chat between you two is rendered inactive. If that user has an open |
by removing name attribute in form textarea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
What type of PR is this? (check all applicable)
Description
This PR adds open inbox to users that want to allow others to message without mutually following each other.
The column
inbox_typeis added to Users with "private" as the default value. The only other option right now is "open." This can be changed undersettings/misc.An
inbox_typeof "private" retains the previous (default) behavior of DEV Connect, where only users that mutually follow each other can send messages to one another. Now, if you view a user you follow and that follows you, a chat button will be displayed beside the following button.An
inbox_typeof "open" displays a chat button on your profile and allows any user, whether you mutually follow each other or not, to open a chat with you on DEV Connect. This works by calling theopen_chatmethod inusers_controllerand creating a chat channel (if none already exist between you and the user with an open inbox) and redirect you todev.to/connect/@username.To-do:
inbox_typethat message is false and needs to be changed for clarity)follows_controllerpass given changes inshowRelated Tickets & Documents
resolves #1460
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Changing your inbox type in
settings/miscFollow Back button for users that follow you
Users that you follow and follow you have a chat button that redirects to the chat channel between you
Manually changing inbox type to "open" for testing in local environment
New chat for users with open inbox type
If you mutually follow someone who has an open inbox, it will prioritize redirecting straight to
connect/@usernameAdded to documentation?