slack-ruby / slack-ruby/slack-ruby-client

chat_postMessage inline code block with >4000 symbols broken markdown

Aperta
#259 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug?
Lingua principale
Ruby
Stelle
1.3k
Fork
222
Merge medio
1g 14h
PR unite (30g)
3

Descrizione

I'm sending large inline code blocks into our slack rooms and blocks with more than 4000 symbols (roughly) are coming with a broken code style.

This message works fine:

"*test*\n```#{"x"*4000}```\n*test*"

This one came "broken":

"*test*\n```#{"x"*4100}```\n*test*"

It seems that the message is being split into two.
I'm not quite sure whether it's a gem's issue or an API problem.

The doc https://api.slack.com/methods/chat.postMessage#formatting says

For best results, limit the number of characters in the text field to 4,000 characters. Ideally, messages should be short and human-readable. Slack will truncate messages containing more than 40,000 characters.

Messages are not truncated though, just split.
Please guide where to look at.
I'm using v0.14.1 at the moment.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Start at the chat_postMessage entry point and reproduce the issue using the two payloads in the report with 4,000 and 4,100 characters. Compare the client request and Slack response to determine whether splitting happens in slack-ruby-client or the Slack API; done means the cause and expected handling are established.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
ruby
Ambito
api
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.