Fix invoice links slug reg-exp.

This commit is contained in:
John Preston 2022-05-21 15:59:14 +04:00
parent bbaedc1952
commit 3c5267f307

View file

@ -871,7 +871,7 @@ QString TryConvertUrlToLocal(QString url) {
return qsl("tg://socks?") + socksMatch->captured(1);
} else if (auto proxyMatch = regex_match(qsl("^proxy/?\\?(.+)(#|$)"), query, matchOptions)) {
return qsl("tg://proxy?") + proxyMatch->captured(1);
} else if (auto invoiceMatch = regex_match(qsl("^(invoice/|\\$)([a-zA-Z0-9]+)(\\?|#|$)"), query, matchOptions)) {
} else if (auto invoiceMatch = regex_match(qsl("^(invoice/|\\$)([a-zA-Z0-9_\\-]+)(\\?|#|$)"), query, matchOptions)) {
return qsl("tg://invoice?slug=") + invoiceMatch->captured(2);
} else if (auto bgMatch = regex_match(qsl("^bg/([a-zA-Z0-9\\.\\_\\-\\~]+)(\\?(.+)?)?$"), query, matchOptions)) {
const auto params = bgMatch->captured(3);