Allow public links if private are not available

This commit is contained in:
Ali
2023-03-02 20:07:24 +04:00
parent abc6393487
commit 3a48235d13
5 changed files with 42 additions and 30 deletions

View File

@@ -600,8 +600,14 @@ public class SendInviteLinkScreen: ViewControllerComponentContainer {
private var presenceDisposable: Disposable?
public init(context: AccountContext, link: String?, peers: [EnginePeer]) {
public init(context: AccountContext, peer: EnginePeer, link: String?, peers: [EnginePeer]) {
self.context = context
var link = link
if link == nil, let addressName = peer.addressName {
link = "https://t.me/\(addressName)"
}
self.link = link
self.peers = peers