Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
c1153f8d
authored
Oct 14, 2021
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
status
parent
8f1e380a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
xim/xim.ts
xim/xim.ts
View file @
c1153f8d
...
@@ -6,6 +6,7 @@ import { ChatLoggerService } from "./logger";
...
@@ -6,6 +6,7 @@ import { ChatLoggerService } from "./logger";
import
{
Message
,
NotifyMessage
}
from
"./models/chat"
;
import
{
Message
,
NotifyMessage
}
from
"./models/chat"
;
import
chat
from
"./index"
;
import
chat
from
"./index"
;
import
{
STATUS
}
from
"xchat-client/dist/xchat"
;
wampDebug
(
true
);
wampDebug
(
true
);
...
@@ -72,7 +73,10 @@ export class Xim {
...
@@ -72,7 +73,10 @@ export class Xim {
client
.
onstatuschange
=
(
status
:
any
,
details
:
any
)
=>
{
client
.
onstatuschange
=
(
status
:
any
,
details
:
any
)
=>
{
this
.
onStatusChange
(
status
,
details
);
this
.
onStatusChange
(
status
,
details
);
if
(
status
===
"DISCONNECTED"
||
status
===
"CLOSED"
)
{
if
(
status
===
STATUS
.
DISCONNECTED
||
status
===
STATUS
.
CLOSED
)
{
reject
(
status
);
reject
(
status
);
}
}
};
};
...
@@ -332,16 +336,10 @@ export class Xim {
...
@@ -332,16 +336,10 @@ export class Xim {
this
.
debug
(
"xim connected"
);
this
.
debug
(
"xim connected"
);
}
}
/*
DISCONNECTED: "DISCONNECTED",
CONNECTING: "CONNECTING",
CONNECTED: "CONNECTED",
CLOSED: "CLOSED",
*/
private
onStatusChange
(
status
:
any
,
details
:
any
)
{
private
onStatusChange
(
status
:
any
,
details
:
any
)
{
this
.
debug
(
"onstatuschange"
,
status
,
details
);
this
.
debug
(
"onstatuschange"
,
status
,
details
);
this
.
emit
(
Events
.
Status
,
status
,
details
);
this
.
emit
(
Events
.
Status
,
status
,
details
);
if
(
status
===
"DISCONNECTED"
||
status
===
"CLOSED"
)
{
if
(
status
===
STATUS
.
DISCONNECTED
||
status
===
STATUS
.
CLOSED
)
{
this
.
hanldeOffline
();
this
.
hanldeOffline
();
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment