Commit 63aa27fc by panjiangyi

聊天模块内部处理token刷新

parent 9edeeeb6
Showing with 5 additions and 0 deletions
...@@ -34,6 +34,11 @@ class Chat { ...@@ -34,6 +34,11 @@ class Chat {
tokenManager.save(this.token); tokenManager.save(this.token);
EmojiService.raiseOnReady(this.token); EmojiService.raiseOnReady(this.token);
option.sdk().events.addTokenChanged(token => {
this.setToken(() => new Promise(resolve => resolve(token)));
});
return this.initChatSdk(option.webSocketUri); return this.initChatSdk(option.webSocketUri);
} }
......
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