Commit 3d4dc045 by panjiangyi

修改sdk注入

parent 284f5a4a
Showing with 3 additions and 8 deletions
...@@ -43,16 +43,11 @@ export interface ChatOption { ...@@ -43,16 +43,11 @@ export interface ChatOption {
*/ */
webSocketUri: string webSocketUri: string
sdk:UniplatSdk sdk: () => UniplatSdk
orgId: () => string | number orgId: () => string | number
logger?: ChatServiceLogger logger?: ChatServiceLogger
} }
export interface ChatServiceLogger { export interface ChatServiceLogger {
......
...@@ -5,7 +5,7 @@ import { EmojiService } from "../service/emoji" ...@@ -5,7 +5,7 @@ import { EmojiService } from "../service/emoji"
import tokenManager from "./token" import tokenManager from "./token"
import type { UniplatSdk } from "uniplat-sdk" import type { UniplatSdk } from "uniplat-sdk"
class Chat { class Chat {
private _sdk: UniplatSdk private _sdk: () => UniplatSdk
private _orgId: () => string | number = () => "0" private _orgId: () => string | number = () => "0"
private token!: TokenStringGetter private token!: TokenStringGetter
...@@ -40,7 +40,7 @@ class Chat { ...@@ -40,7 +40,7 @@ class Chat {
} }
public getSdk = () => { public getSdk = () => {
return this._sdk return this._sdk()
} }
public getOrgId = () => { public getOrgId = () => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment