mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-28 12:19:54 +00:00
sdk: fix typescript client (#1380)
This commit is contained in:
parent
5c2b70a214
commit
bfa7ff16ff
2 changed files with 12 additions and 3 deletions
|
@ -249,7 +249,7 @@ export class ChatClient {
|
|||
const r = await this.sendChatCommand({type: "showMyAddress"})
|
||||
switch (r.type) {
|
||||
case "userContactLink":
|
||||
return r.connReqContact
|
||||
return r.contactLink.connReqContact
|
||||
default:
|
||||
if (r.type === "chatCmdError" && r.chatError.type === "errorStore" && r.chatError.storeError.type === "userContactLinkNotFound") {
|
||||
return undefined
|
||||
|
|
|
@ -280,8 +280,7 @@ export interface CRCmdOk extends CR {
|
|||
|
||||
export interface CRUserContactLink extends CR {
|
||||
type: "userContactLink"
|
||||
connReqContact: string
|
||||
autoAccept: boolean
|
||||
contactLink: UserContactLink
|
||||
}
|
||||
|
||||
export interface CRUserContactLinkUpdated extends CR {
|
||||
|
@ -913,6 +912,16 @@ interface FileTransferMeta {
|
|||
cancelled: boolean
|
||||
}
|
||||
|
||||
interface UserContactLink {
|
||||
connReqContact: string
|
||||
autoAccept?: AutoAccept
|
||||
}
|
||||
|
||||
interface AutoAccept {
|
||||
acceptIncognito: boolean
|
||||
autoReply?: MsgContent
|
||||
}
|
||||
|
||||
export interface ChatStats {
|
||||
unreadCount: number
|
||||
minUnreadItemId: number
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue