mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
same origin
This commit is contained in:
parent
348718de5e
commit
a4b44a4739
1 changed files with 10 additions and 0 deletions
|
|
@ -60,6 +60,9 @@ func _internal_requestSimpleWebView(postbox: Postbox, network: Network, botId: P
|
|||
if (flags & (1 << 2)) != 0 {
|
||||
resultFlags.insert(.fullScreen)
|
||||
}
|
||||
if (flags & (1 << 3)) != 0 {
|
||||
resultFlags.insert(.sameOrigin)
|
||||
}
|
||||
return .single(RequestWebViewResult(flags: resultFlags, queryId: queryId, url: url, keepAliveSignal: nil))
|
||||
}
|
||||
}
|
||||
|
|
@ -111,6 +114,9 @@ func _internal_requestMainWebView(postbox: Postbox, network: Network, peerId: Pe
|
|||
if (flags & (1 << 2)) != 0 {
|
||||
resultFlags.insert(.fullScreen)
|
||||
}
|
||||
if (flags & (1 << 3)) != 0 {
|
||||
resultFlags.insert(.sameOrigin)
|
||||
}
|
||||
return .single(RequestWebViewResult(flags: resultFlags, queryId: queryId, url: url, keepAliveSignal: nil))
|
||||
}
|
||||
}
|
||||
|
|
@ -137,6 +143,7 @@ public struct RequestWebViewResult {
|
|||
|
||||
public static let fullSize = Flags(rawValue: 1 << 0)
|
||||
public static let fullScreen = Flags(rawValue: 1 << 1)
|
||||
public static let sameOrigin = Flags(rawValue: 1 << 2)
|
||||
}
|
||||
|
||||
public let flags: Flags
|
||||
|
|
@ -363,6 +370,9 @@ func _internal_requestAppWebView(postbox: Postbox, network: Network, stateManage
|
|||
if (flags & (1 << 2)) != 0 {
|
||||
resultFlags.insert(.fullScreen)
|
||||
}
|
||||
if (flags & (1 << 3)) != 0 {
|
||||
resultFlags.insert(.sameOrigin)
|
||||
}
|
||||
return .single(RequestWebViewResult(flags: resultFlags, queryId: queryId, url: url, keepAliveSignal: nil))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue