same origin

This commit is contained in:
Mikhail Filimonov 2026-05-27 12:54:59 +01:00
parent 348718de5e
commit a4b44a4739

View file

@ -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))
}
}