mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-03 16:05:57 +00:00
Custom "Copy ID" for peer ID context menu.
This commit is contained in:
@@ -1162,7 +1162,14 @@ bool Application::openCustomUrl(
|
||||
|| passcodeLocked()) {
|
||||
return false;
|
||||
}
|
||||
const auto command = base::StringViewMid(urlTrimmed, protocol.size(), 8192);
|
||||
static const auto kTagExp = QRegularExpression(
|
||||
u"\\~[a-zA-Z0-9_\\-]+\\~:"_q);
|
||||
auto skip = protocol.size();
|
||||
const auto match = kTagExp.match(urlTrimmed, skip);
|
||||
if (match.hasMatch()) {
|
||||
skip += match.capturedLength();
|
||||
}
|
||||
const auto command = base::StringViewMid(urlTrimmed, skip, 8192);
|
||||
const auto my = context.value<ClickHandlerContext>();
|
||||
const auto controller = my.sessionWindow.get()
|
||||
? my.sessionWindow.get()
|
||||
|
Reference in New Issue
Block a user