plan: web previews for channels (#7022)

* plan: web previews for channels

* types for recipient side to support channel web previews and domain names

* fix

* migrations

* update schema and api types

* update schema

* rename migrations

* core: check member role

---------

Co-authored-by: Evgeny @ SimpleX Chat <259188159+evgeny-simplex@users.noreply.github.com>
This commit is contained in:
Evgeny
2026-05-31 17:12:12 +01:00
committed by GitHub
parent 68fc1b5d22
commit 9bb2bec3fa
25 changed files with 894 additions and 44 deletions
+13
View File
@@ -2531,10 +2531,22 @@ public enum GroupType: Codable, Hashable {
}
}
public struct PublicGroupAccess: Codable, Hashable {
public var groupWebPage: String?
public var groupDomain: String?
public var domainWebPage: Bool = false
public var allowEmbedding: Bool = false
}
public struct RelayCapabilities: Codable, Hashable {
public var baseWebUrl: String?
}
public struct PublicGroupProfile: Codable, Hashable {
public var groupType: GroupType
public var groupLink: String
public var publicGroupId: String
public var publicGroupAccess: PublicGroupAccess?
}
public struct GroupProfile: Codable, NamedChat, Hashable {
@@ -2703,6 +2715,7 @@ public struct GroupRelay: Identifiable, Decodable, Equatable, Hashable {
public var userChatRelay: UserChatRelay
public var relayStatus: RelayStatus
public var relayLink: String?
public var relayCap: RelayCapabilities
public var id: Int64 { groupRelayId }
}
@@ -2209,11 +2209,25 @@ object GroupTypeSerializer : KSerializer<GroupType> {
}
}
@Serializable
data class PublicGroupAccess(
val groupWebPage: String? = null,
val groupDomain: String? = null,
val domainWebPage: Boolean = false,
val allowEmbedding: Boolean = false
)
@Serializable
data class RelayCapabilities(
val baseWebUrl: String? = null
)
@Serializable
data class PublicGroupProfile(
val groupType: GroupType,
val groupLink: String,
val publicGroupId: String
val publicGroupId: String,
val publicGroupAccess: PublicGroupAccess? = null
)
@Serializable
@@ -2337,7 +2351,8 @@ data class GroupRelay(
val groupMemberId: Long,
val userChatRelay: UserChatRelay,
val relayStatus: RelayStatus,
val relayLink: String? = null
val relayLink: String? = null,
val relayCap: RelayCapabilities
) {
val id: Long get() = groupRelayId
}