Add alias to public room creation (#3450)

* added the address section

* updated code and strings

* syncing name and address

* improved code

* added a way to reset the state

* better documentation

* update strings

* handling the alias

* alias error state

* update strings

* error handling

* improved the error handling

* new preview tests, even if they do not work well

* improved tests

* unit tests

* pr comments and using the correct value

* fix

* pr comments

* to improve safety and control of the FF

* fixed a test

* updated tests

* update SDK
This commit is contained in:
Mauro
2024-11-08 15:49:20 +01:00
committed by GitHub
parent c567901ec5
commit e7d4ea0d35
39 changed files with 592 additions and 115 deletions
@@ -88,7 +88,7 @@ protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
var deviceID: String? { get }
var homeserver: String { get }
var slidingSyncVersion: SlidingSyncVersion { get }
var availableSlidingSyncVersions: [SlidingSyncVersion] { get async }
@@ -133,7 +133,13 @@ protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
func createDirectRoom(with userID: String, expectedRoomName: String?) async -> Result<String, ClientProxyError>
// swiftlint:disable:next function_parameter_count
func createRoom(name: String, topic: String?, isRoomPrivate: Bool, isKnockingOnly: Bool, userIDs: [String], avatarURL: URL?) async -> Result<String, ClientProxyError>
func createRoom(name: String,
topic: String?,
isRoomPrivate: Bool,
isKnockingOnly: Bool,
userIDs: [String],
avatarURL: URL?,
aliasLocalPart: String?) async -> Result<String, ClientProxyError>
func joinRoom(_ roomID: String, via: [String]) async -> Result<Void, ClientProxyError>
@@ -173,6 +179,8 @@ protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
func resolveRoomAlias(_ alias: String) async -> Result<ResolvedRoomAlias, ClientProxyError>
func isAliasAvailable(_ alias: String) async -> Result<Bool, ClientProxyError>
func getElementWellKnown() async -> Result<ElementWellKnown?, ClientProxyError>
// MARK: - Ignored users