Cache translation from channel and user name to ID (translation prone to failure)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Start with lib/slack/web/api/mixins/channels.id.rb and the background in #270. Compare the three proposed approaches, including conversations.list pagination and the current README guidance, then establish which behavior should be supported. Done means the chosen channel-name translation policy is implemented and the README accurately documents it.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
When a channel name is given for a channel parameter, rather than a channel ID, we are using channels.list to look up the ID of the channel and then using the ID in the request instead of the name.
However, channels.list is a legacy method and is no longer guaranteed to return every channel. This leads to a channel_not_found error if you pass a channel name for a channel that is not supported by channels.list.
A couple suggested solutions:
- Update
channels_idto useconversations.listinstead ofchannels.list. The tricky thing about this is thatconversations.listonly works with pagination, so it's not a simple drop-in replacement. It also means that if you do something likechat_postMessage(channel: 'general', text: 'foo')then for a team with many channels you might end up making hundreds of paginated calls toconversations.listbefore actually hittingchat.postMessage, which is not ideal. If we use this solution I think we should change the readme to discourage this approach and encourage using channel IDs directly. - Remove the translation completely, which would be a breaking change (but not the worst breaking change, since it's already basically broken). Since using
conversations.listis not ideal for making the translation (see above) we could remove support for this altogether, forcing people to confront the issue directly. - Leave it as it is, and update the readme to note that it does not always work and discourage its use.
See #270 for more background.
- Ngôn ngữ chính
- Ruby
- Star
- 1.3k
- Fork
- 222
- Merge trung bình
- 1 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của slack-ruby/slack-ruby-client
-
new feature question
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
slack-ruby/slack-ruby-client#586 · 3 bình luận ·
-
bug?
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
slack-ruby/slack-ruby-client#579 · 3 bình luận ·
-
new feature web api
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
slack-ruby/slack-ruby-client#482 · 5 bình luận ·
-
new feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
slack-ruby/slack-ruby-client#414 · 14 bình luận ·
-
confirmed bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
slack-ruby/slack-ruby-client#409 · 5 bình luận ·
Tất cả issue của slack-ruby/slack-ruby-client
Issue tương tự
-
user-reported
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Kong/developer.konghq.com#7316 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
TheOdinProject/curriculum#31408 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
notch8/utk_knapsack#148 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Homebrew/homebrew-cask#288729 · 1 bình luận ·
-
Test `FileUtils.options_of` Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100