Menu

#172 [bug] link display issue

open
nobody
2025-11-15
2025-11-04
Anonymous
No

Originally created by: supreme-gg-gg

Describe the bug
Sometimes when link does not have a text body (unknown cause) it does not get displayed properly and you get a placeholder instead. This is done by checking item.text field in messages received.

To Reproduce
Steps to reproduce the behavior:

  1. Open chats with links
  2. It is a placeholder [Sent a Link]

Expected behavior
We should handle these pure url links and display the url instead so the user can click open them. I believe we simply forgot to explicitly handle link type message and it should be a minor fix. Might need to investigate Api results though.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Discussion

  • Anonymous

    Anonymous - 2025-11-06

    Originally posted by: vitordsb

    Oi pessoal! Resolvi dar uma olhada nessa issue. A causa é que, quando o payload do MQTT chega apenas com item.link (sem item.text), o parser cai direto no placeholder [Sent a link]. Ajustei instagram-ts/source/utils/message-parser.ts para inspecionar os dados do link (url, web_uri, links etc.) e escolher o primeiro URL/texto válido disponível. Com isso o CLI volta a exibir o link clicável e só mantém o placeholder se absolutamente nada vier na resposta.

    Não consegui rodar npm run build até o fim porque o TypeScript já quebra em source/client.ts:516 (parece ser um erro pré-existente), mas a alteração em si está compilando e resolve o bug nos testes manuais com mensagens de link puro. Posso abrir um PR com essa correção se fizer sentido pra vocês!

     
  • Anonymous

    Anonymous - 2025-11-06

    Originally posted by: supreme-gg-gg

    Hey @vitordsb, thanks for your solution! I had to translate it to English so let me know if I understood anything wrong. That sounds like a reasonable cause, definitely open a PR and we will have a look! For the npm run build bug, can you provide the specific error logs? The build works fine for me and on CI.

     
  • Anonymous

    Anonymous - 2025-11-15

    Originally posted by: supreme-gg-gg

    Hey @vitordsb are you still working on this? Otherwise I will pick this up 😄

     

Log in to post a comment.

Monday.com Logo