velour / chat

An easy-to-use client for Slack, Telegram, IRC, or all at once!
7 stars 0 forks source link

slack: sending image URLs crashes bridge #90

Closed chrissexton closed 7 years ago

chrissexton commented 7 years ago
screenshot 2017-02-04 14 19 14
2017/02/04 14:12:40 Telegram RPC editMessageText map[text:<b>skiesel:</b> https://s-media-cache-ak0.p
inimg.com/originals/7e/e3/24/7ee3243f9d26e9638a05a266d28b7123.jpg parse_mode:HTML chat_id:-197867592
message_id:18449] failed: Bad Request: message is not modified
2017/02/04 14:12:40 Bridge closed with error: failed to send edit to #velour on Telegram: Bad Request
: message is not modified
eaburns commented 7 years ago

When you send a URL, Slack follows it up with a message_changed event containing the exact same, unchanged message… maybe this is an artifact of its unfurling? The timestamp of the edited message is different, so we can't drop it on the Slack end—the bridge should update it's log with the new timestamp (though see Issue #89). So, instead we need to detect such Edits in the bridge's relay and drop them there.