mirror of https://github.com/procxx/kepka.git
changed s|sg to start|startgroup in telegram.me links, version 0.8.27.dev
This commit is contained in:
parent
9b863fcf5b
commit
391b370b0f
|
@ -750,11 +750,10 @@ void TextLink::onClick(Qt::MouseButton button) const {
|
||||||
if (telegramMeUser.hasMatch()) {
|
if (telegramMeUser.hasMatch()) {
|
||||||
QString params = url.mid(telegramMeUser.captured(0).size()), start, startToken;
|
QString params = url.mid(telegramMeUser.captured(0).size()), start, startToken;
|
||||||
if (!params.isEmpty()) {
|
if (!params.isEmpty()) {
|
||||||
QRegularExpressionMatch startParams = QRegularExpression(qsl("(^|&)(s|sg)=([a-zA-Z0-9\\.\\_\\-]+)(&|$)"), QRegularExpression::CaseInsensitiveOption).match(params);
|
QRegularExpressionMatch startParams = QRegularExpression(qsl("(^|&)(start|startgroup)=([a-zA-Z0-9\\.\\_\\-]+)(&|$)"), QRegularExpression::CaseInsensitiveOption).match(params);
|
||||||
if (startParams.hasMatch()) {
|
if (startParams.hasMatch()) {
|
||||||
start = startParams.captured(2);
|
start = startParams.captured(2);
|
||||||
startToken = startParams.captured(3);
|
startToken = startParams.captured(3);
|
||||||
start = (start == qsl("sg") ? qsl("startgroup") : (start == qsl("s") ? qsl("start") : QString()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
App::openUserByName(telegramMeUser.captured(1), start == qsl("startgroup"), startToken);
|
App::openUserByName(telegramMeUser.captured(1), start == qsl("startgroup"), startToken);
|
||||||
|
|
Loading…
Reference in New Issue