Cache translation from channel and user name to ID (translation prone to failure)
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Ruby
- Sterne
- 1.3k
- Forks
- 222
- Ø Merge
- 1 T. 14 Std.
- Gemergte PRs (30 T.)
- 3
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus slack-ruby/slack-ruby-client
-
new feature question
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
slack-ruby/slack-ruby-client#586 · 3 Kommentare ·
-
bug?
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 45/100
slack-ruby/slack-ruby-client#579 · 3 Kommentare ·
-
new feature web api
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 42/100
slack-ruby/slack-ruby-client#482 · 5 Kommentare ·
-
new feature
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
slack-ruby/slack-ruby-client#414 · 14 Kommentare ·
-
confirmed bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
slack-ruby/slack-ruby-client#409 · 5 Kommentare ·
Alle Issues in slack-ruby/slack-ruby-client
Ähnliche Issues
-
バグ
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
voxpupuli/puppet-epel#186 · 1 Kommentar ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) OffenBug Frontend
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
TheOdinProject/curriculum#31402 · 1 Kommentar ·
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100