mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-10-22 13:11:55 +00:00
core: fix short link type when adding for group link (#5942)
* core: fix short link type when adding for group link * shorten, rename * update setContactShortLink * update * fix * plans * simplexmq * ui: show error when setting short link --------- Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
This commit is contained in:
1 parent
6acd239339
commit
b2bc4d6a5c
14 files changed
+62
-54
No files matched your search
@@ -1210,9 +1210,9 @@ private func userAddressResponse(_ r: APIResult<ChatResponse1>) throws -> UserCo
|
||||
}
|
||||
}
|
||||
|
||||
func apiAddShortLinkMyAddress() async throws -> UserContactLink {
|
||||
let userId = try currentUserId("apiAddShortLinkMyAddress")
|
||||
let r: ChatResponse1 = try await chatSendCmd(.apiAddShortLinkMyAddress(userId: userId))
|
||||
func apiAddMyAddressShortLink() async throws -> UserContactLink {
|
||||
let userId = try currentUserId("apiAddMyAddressShortLink")
|
||||
let r: ChatResponse1 = try await chatSendCmd(.apiAddMyAddressShortLink(userId: userId))
|
||||
if case let .userContactLink(_, contactLink) = r { return contactLink }
|
||||
throw r.unexpected
|
||||
}
|
||||
@@ -1743,8 +1743,8 @@ func apiGetGroupLink(_ groupId: Int64) throws -> (CreatedConnLink, GroupMemberRo
|
||||
}
|
||||
}
|
||||
|
||||
func apiAddShortLinkGroupLink(_ groupId: Int64) async throws -> (CreatedConnLink, GroupMemberRole) {
|
||||
let r: ChatResponse2 = try await chatSendCmd(.apiAddShortLinkGroupLink(groupId: groupId))
|
||||
func apiAddGroupShortLink(_ groupId: Int64) async throws -> (CreatedConnLink, GroupMemberRole) {
|
||||
let r: ChatResponse2 = try await chatSendCmd(.apiAddGroupShortLink(groupId: groupId))
|
||||
if case let .groupLink(_, _, connLink, memberRole) = r { return (connLink, memberRole) }
|
||||
throw r.unexpected
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user