mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix folder link slug
This commit is contained in:
parent
68238bd59f
commit
0211fc2c9c
@ -47,7 +47,11 @@ public final class QrCodeScreen: ViewController {
|
||||
case let .invite(invite, _):
|
||||
return invite.link ?? ""
|
||||
case let .chatFolder(slug):
|
||||
return slug
|
||||
if slug.hasPrefix("https://") {
|
||||
return slug
|
||||
} else {
|
||||
return "https://t.me/addlist/\(slug)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,8 +59,8 @@ public struct ExportedChatFolderLink: Equatable {
|
||||
public extension ExportedChatFolderLink {
|
||||
var slug: String {
|
||||
var slug = self.link
|
||||
if slug.hasPrefix("https://t.me/folder/") {
|
||||
slug = String(slug[slug.index(slug.startIndex, offsetBy: "https://t.me/folder/".count)...])
|
||||
if slug.hasPrefix("https://t.me/addlist/") {
|
||||
slug = String(slug[slug.index(slug.startIndex, offsetBy: "https://t.me/addlist/".count)...])
|
||||
}
|
||||
return slug
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user