From ea1ea65f6dea8f1cb435cdd70c893f4d477a90de Mon Sep 17 00:00:00 2001 From: cumdev1337 Date: Fri, 22 May 2026 02:23:20 +0300 Subject: [PATCH] fix: clickable timestamps in blockquote --- .../SourceFiles/history/view/media/history_view_media.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/history/view/media/history_view_media.cpp b/Telegram/SourceFiles/history/view/media/history_view_media.cpp index 54ce46a09d..8159b021f1 100644 --- a/Telegram/SourceFiles/history/view/media/history_view_media.cpp +++ b/Telegram/SourceFiles/history/view/media/history_view_media.cpp @@ -161,9 +161,13 @@ TextWithEntities AddTimestampLinks( from, std::less<>(), &EntityInText::offset); + const auto allowsTimestampLink = [](const EntityInText &entity) { + return (entity.type() == EntityType::Spoiler) + || (entity.type() == EntityType::Blockquote); + }; while (i != entities.end() && i->offset() < till - && i->type() == EntityType::Spoiler) { + && allowsTimestampLink(*i)) { ++i; } if (i != entities.end() && i->offset() < till) { @@ -172,7 +176,7 @@ TextWithEntities AddTimestampLinks( const auto intersects = [&](const EntityInText &entity) { return (entity.offset() + entity.length() > from) - && (entity.type() != EntityType::Spoiler); + && !allowsTimestampLink(entity); }; auto j = std::make_reverse_iterator(i); const auto e = std::make_reverse_iterator(entities.begin());