Cache translation from channel and user name to ID (translation prone to failure)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Ruby
- Stelle
- 1.3k
- Fork
- 222
- Merge medio
- 1g 14h
- PR unite (30g)
- 3
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di slack-ruby/slack-ruby-client
-
new feature question
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
slack-ruby/slack-ruby-client#586 · 3 commenti ·
-
bug?
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
slack-ruby/slack-ruby-client#579 · 3 commenti ·
-
new feature web api
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
slack-ruby/slack-ruby-client#482 · 5 commenti ·
-
new feature
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
slack-ruby/slack-ruby-client#414 · 14 commenti ·
-
confirmed bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
slack-ruby/slack-ruby-client#409 · 5 commenti ·
Tutte le issue di slack-ruby/slack-ruby-client
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
-
バグ
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
Version bump for OpenVox 9 Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
voxpupuli/puppet-epel#186 · 1 commento ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) ApertaBug Frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100