-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support opening a new chat from the Folders tab #5688
Conversation
shared/actions/chat.js
Outdated
@@ -1173,6 +1178,12 @@ function _unboxedToMessage (message: MessageUnboxed, idx: number, yourName, your | |||
} | |||
} | |||
|
|||
function * _openTlfInChat (action: OpenTlfInChat): SagaGenerator<any, any> { | |||
const tlf = action.payload | |||
const users = tlf.split(',') |
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.
you should use the kbfs helpers to do this
@chrisnojima Thanks, fixed that, also now checks to see whether there are any readers (e.g. |
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.
hasReaders might be better named as hasReadonlyUsers or something, but its fine
@keybase/react-hackers
This PR adds two new buttons: A "Chat" button to each row in the main folders tab view of rows, and an "Open in chat" button inside the per-folder view.
Our startConversation() action takes a list of users (and is fine to call on an existing conversation), so we just take the TLF name from
folder.sortName
(e.g. cjb,chrisnojima,max) and calltlf.split(',')
to get the users array.The chat buttons are only shown on private folders, not public ones. No implementation for mobile yet.