[Telegram] Opening an external link error
Avoid duplicates
- [x] I agree to follow the Code of Conduct that this project adheres to.
- [x] I have searched the issues tracker for a bug report similar to mine, in vain
Ferdium Version
7.0.0
What Operating System are you using?
Windows
Operating System Version
Windows 10
What arch are you using?
x64
Last Known Working Ferdium version
7.0.0
Expected Behavior
Clicking on a external web link would move to designated website
Actual Behavior
Clicking on a external web link does not work anymore as it gives every time https://web.telegram.org/a/[object%20Object].
It used to work 2-3 weeks ago, but Telegram updated their engine and stopped working
Steps to reproduce
- Go to any chat
- Click on a external link
- Link https://web.telegram.org/a/[object%20Object] is opened in the browser
Debug link
No response
Screenshots
No response
Additional information
No response
Same here using macOS and latest Ferdium 7.0
Same on Arch Linux
Ubuntu here with the same problem (deb installation)
+1
same here on Linux mint (flatpak 7.0.0)
Same on Ubuntu 24.04.2 LTS
At least on macOS, the issue is present just for "direct" links, i.e. when the message text is automatically converted in a clickable url.
https://github.com/user-attachments/assets/b989a893-1947-411f-9c6a-39ee9833c095
If the link is composed using the anchor function (add text -> select anchor -> insert link -> save)
https://github.com/user-attachments/assets/5fe13190-9241-472b-a959-93d036bf9bbd
the user is presented with the open link popup, and that works
I can't seem to debug the issue using ferdium developer tools, but from the web client html structure is basically the same, I'd guess there's a different handling in the js part.
Not working html message structure
<div id="message-358385"
class="shown open Message message-list-item first-in-group allow-selection last-in-group last-in-list own"
data-message-id="358385">
<div class="bottom-marker" data-message-id="358385" data-should-update-views="false"></div>
<div class="message-select-control no-selection"></div>
<div class="message-content-wrapper can-select-text">
<div
class="message-content peer-color-count-1 text has-shadow has-solid-background has-appendix has-footer"
style="" dir="auto">
<div class="content-inner" dir="auto">
<div class="text-content clearfix with-meta with-outgoing-icon" dir="auto">
<a href="https://www.google.com" title="https://www.google.com/" target="_blank"
rel="noopener noreferrer" class="text-entity-link word-break-all" dir="auto"
data-entity-type="MessageEntityUrl">https://www.google.com</a>
<span class="MessageMeta" dir="ltr" data-ignore-on-paste="true">
<span class="message-time">12:38</span>
<div class="MessageOutgoingStatus">
<div class="Transition">
<div class="Transition_slide Transition_slide-active">
<i class="icon icon-message-succeeded" aria-hidden="true"></i>
</div>
</div>
</div>
</span>
</div>
</div>
<div class="message-action-buttons"></div>
<svg width="9" height="20" class="svg-appendix">
<defs>
<filter x="-50%" y="-14.7%" width="200%" height="141.2%"
filterUnits="objectBoundingBox" id="messageAppendix">
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1"
result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix
values="0 0 0 0 0.0621962482 0 0 0 0 0.138574144 0 0 0 0 0.185037364 0 0 0 0.15 0"
in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g fill="none" fill-rule="evenodd">
<path
d="M6 17H0V0c.193 2.84.876 5.767 2.05 8.782.904 2.325 2.446 4.485 4.625 6.48A1 1 0 016 17z"
fill="#000" filter="url(#messageAppendix)"></path>
<path
d="M6 17H0V0c.193 2.84.876 5.767 2.05 8.782.904 2.325 2.446 4.485 4.625 6.48A1 1 0 016 17z"
fill="#EEFFDE" class="corner"></path>
</g>
</svg>
<div class="quick-reaction">
<img class="ReactionStaticEmoji opacity-transition slow open shown"
style="width: 28px; height: 28px;"
src="blob:https://web.telegram.org/5002526c-46c9-4abe-8eb1-30f65449a8dd"
alt="Red Heart" draggable="false">
</div>
</div>
</div>
</div>
Working html message structure
<div id="message-358383"
class="Message message-list-item allow-selection last-in-group last-in-list own shown open"
data-message-id="358383">
<div class="bottom-marker" data-message-id="358383" data-should-update-views="false"></div>
<div class="message-select-control no-selection"></div>
<div class="message-content-wrapper can-select-text">
<div
class="message-content peer-color-count-1 text has-shadow has-solid-background has-appendix has-footer"
style="" dir="auto">
<div class="content-inner" dir="auto">
<div class="text-content clearfix with-meta with-outgoing-icon" dir="auto">
<a href="https://www.google.com/" title="https://www.google.com/"
target="_blank" rel="noopener noreferrer" class="text-entity-link"
dir="auto" data-entity-type="MessageEntityUrl">google</a>
<span class="MessageMeta" dir="ltr" data-ignore-on-paste="true">
<span class="message-time">12:28</span>
<div class="MessageOutgoingStatus">
<div class="Transition">
<div class="Transition_slide Transition_slide-active">
<i class="icon icon-message-succeeded" aria-hidden="true"></i>
</div>
</div>
</div>
</span>
</div>
</div>
<div class="message-action-buttons"></div>
<svg width="9" height="20" class="svg-appendix">
<defs>
<filter x="-50%" y="-14.7%" width="200%" height="141.2%"
filterUnits="objectBoundingBox" id="messageAppendix">
<feOffset dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="1" in="shadowOffsetOuter1"
result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix
values="0 0 0 0 0.0621962482 0 0 0 0 0.138574144 0 0 0 0 0.185037364 0 0 0 0.15 0"
in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g fill="none" fill-rule="evenodd">
<path
d="M6 17H0V0c.193 2.84.876 5.767 2.05 8.782.904 2.325 2.446 4.485 4.625 6.48A1 1 0 016 17z"
fill="#000" filter="url(#messageAppendix)"></path>
<path
d="M6 17H0V0c.193 2.84.876 5.767 2.05 8.782.904 2.325 2.446 4.485 4.625 6.48A1 1 0 016 17z"
fill="#EEFFDE" class="corner"></path>
</g>
</svg>
<div class="quick-reaction">
<img class="ReactionStaticEmoji opacity-transition slow open shown"
style="width: 28px; height: 28px;"
src="blob:https://web.telegram.org/5002526c-46c9-4abe-8eb1-30f65449a8dd"
draggable="false" alt="Red Heart">
</div>
</div>
</div>
</div>
Note that if you switch to the "K" version, the links work!
On Arch. Left clicking a link gives a broken link, but middle clicking opens it correctly.
Same behaviour on Fedora 42, also "K" Version works fine, "a" version does not.
See #2209