Skip to content
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 private channels #165

Merged
merged 1 commit into from
Jan 27, 2021
Merged

Support private channels #165

merged 1 commit into from
Jan 27, 2021

Conversation

insomniacslk
Copy link
Owner

This patch adds support to private channels. Previously, private
channels were read-only, while now it's bidirectional like public
channels and IMs.

This required a refactoring of the channels API, and a few bug fixes.
Now anything channel-related goes through the Channel and Channels
structures, and should not use the Slack conversations API directly
anymore.

Signed-off-by: Andrea Barberio [email protected]

@insomniacslk
Copy link
Owner Author

CC @gjabell

@codecov
Copy link

codecov bot commented Jan 26, 2021

Codecov Report

Merging #165 (71a4684) into master (3cfeb31) will decrease coverage by 0.85%.
The diff coverage is 5.26%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #165      +/-   ##
=========================================
- Coverage    9.84%   8.99%   -0.86%     
=========================================
  Files           9       9              
  Lines        1026    1090      +64     
=========================================
- Hits          101      98       -3     
- Misses        921     987      +66     
- Partials        4       5       +1     
Flag Coverage Δ
unittest 8.99% <5.26%> (-0.86%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/ircslack/event_handler.go 0.00% <0.00%> (ø)
pkg/ircslack/irc_context.go 0.00% <0.00%> (ø)
pkg/ircslack/irc_server.go 0.00% <0.00%> (ø)
pkg/ircslack/channel.go 6.77% <6.77%> (ø)
pkg/ircslack/users.go 43.75% <8.82%> (-11.81%) ⬇️
pkg/ircslack/channels.go 37.63% <13.20%> (-32.58%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3cfeb31...71a4684. Read the comment docs.

@insomniacslk
Copy link
Owner Author

TODO before merging this PR: now the channel names in the chanlist don't show have the prefix anymore (e.g. general instead of #general)

pkg/ircslack/channel.go Outdated Show resolved Hide resolved
@insomniacslk insomniacslk force-pushed the private_channels branch 2 times, most recently from 94c9a57 to 3a623e8 Compare January 26, 2021 23:06
@insomniacslk
Copy link
Owner Author

Tested on multiple teams on public and private channels, and on IM. Still not working in threads

@insomniacslk insomniacslk force-pushed the private_channels branch 2 times, most recently from 174be66 to 3ef0097 Compare January 27, 2021 00:24
@insomniacslk
Copy link
Owner Author

Now also tested on threads in public and private channels

@insomniacslk
Copy link
Owner Author

Messages and threads to self are not yet supported. See #166

@insomniacslk
Copy link
Owner Author

Will merge this PR tomorrow if no other issue appears

@insomniacslk
Copy link
Owner Author

insomniacslk commented Jan 27, 2021

the last update fixes IMs that I broke accidentally in this PR. So now the test matrix is:

public channel private channel multiparty IM IM
from me works works doesn't work (roadmap) works
to me works works works works
thread from me works works untested doesn't work (roadmap)
thread to me works works untested works (sends in the IM chat)

@insomniacslk
Copy link
Owner Author

Updated readme with feature matrix

This patch adds support to private channels. Previously, private
channels were read-only, while now it's bidirectional like public
channels and IMs.

This required a refactoring of the channels API, and a few bug fixes.
Now anything channel-related goes through the Channel and Channels
structures, and should not use the Slack conversations API directly
anymore.

Signed-off-by: Andrea Barberio <[email protected]>
@insomniacslk insomniacslk merged commit 3e14d5a into master Jan 27, 2021
@insomniacslk insomniacslk deleted the private_channels branch January 27, 2021 14:12
@insomniacslk
Copy link
Owner Author

Merged! This one took quite a lot of work, but I'm happy with the result (hopefully I won't take those words back :D ). Next is to add some serious testing, since any change to this project is hard to validate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants