sdk: fix typescript client (#1380)
This commit is contained in:
committed by
GitHub
parent
5c2b70a214
commit
bfa7ff16ff
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user