Urgent.News

What's breaking now, across thousands of outlets.

Tech

Telegram Message Entities: Keep Links and Emoji Intact in Your CRM [cross-post]

When a Telegram enquiry reaches a CRM with the wrong link or a clipped word after an emoji, inspect the text mapping before changing webhook delivery. Telegram's message entities identify ranges using UTF-16 code units. Those ranges belong to the original text or caption, not a cleaned copy. Preserve the source string with its entities, then produce a separate plain-text view and validated link…

This brief outlines the importance of preserving Telegram message entities, including links and emojis, when integrating with a CRM. It explains that Telegram message entities identify ranges using UTF-16 code units, which can differ from Unicode code-point positions used in Python strings. The article provides a specific example where an emoji followed by a word can result in a mapping defect if not handled correctly.

It emphasizes the need to store the original source text and its associated entities separately from any derived representations, and to use tested libraries or documented encoding methods to handle emojis and other special characters. The guide is intended for maintainers of custom Telegram Bot API integrations and is not a verified built-in capability.

Brief written by urgent.news from Dev.to's own syndicated text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Wire Harness Design for OEM Builds: Connector Selection, Crimp Quality and the Tests That Prevent Field Failures

A wire harness is usually the last component designed and the first one blamed when a product fails in the field. Intermittent faults that vanish on the bench are almost always harness-related: a…

  • Document electrical and environmental envelope before connector selection
  • Select connectors based on current per circuit, vibration, and exposure factors
  • Perform 100% testing for continuity, insulation, and vibration resistance

supabase-js try/catch Doesn't Catch Errors: Check { error }

Conclusion supabase-js query methods never throw on network or PostgREST failure. The contract template's current-version resolver branched only on whether data was present, without ever looking at…

  • Supabase-js query methods failed to handle network or PostgREST errors.
  • Contract-template resolver couldn't distinguish transient read failures from lack of published rows.
  • Refactored code into readCurrentRow function to check errors and return row data tuple.

More from Thursday 5 November →