Cache translation from channel and user name to ID (translation prone to failure)
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Ruby
- スター
- 1.3k
- フォーク
- 222
- 平均マージ
- 1日 14時間
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
slack-ruby/slack-ruby-client のほかの issue
-
new feature question
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
slack-ruby/slack-ruby-client#586 · コメント 3 件 ·
-
bug?
難易度 2/5 1〜3時間 初心者へのやさしさ 45/100
slack-ruby/slack-ruby-client#579 · コメント 3 件 ·
-
new feature web api
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
slack-ruby/slack-ruby-client#482 · コメント 5 件 ·
-
new feature
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
slack-ruby/slack-ruby-client#414 · コメント 14 件 ·
-
confirmed bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
slack-ruby/slack-ruby-client#409 · コメント 5 件 ·
slack-ruby/slack-ruby-client の issue をすべて見る
似ている issue
-
バグ
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
voxpupuli/puppet-epel#186 · コメント 1 件 ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) オープンBug Frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
TheOdinProject/curriculum#31402 · コメント 1 件 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100