Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d04bd6a437 | |||
| 0e553767b6 | |||
| b7af5497a4 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@chatenium/chatenium-sdk",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.8",
|
||||
"description": "A library for interacting with the Chatenium API",
|
||||
"type": "module",
|
||||
"main": "dist/index.js",
|
||||
|
||||
@@ -28,4 +28,8 @@ export const dmHandlers = [
|
||||
message: body.message,
|
||||
})
|
||||
}),
|
||||
|
||||
http.post('*/v2/chat/dm/joinWebSocketRoom', async () => {
|
||||
return HttpResponse.json()
|
||||
}),
|
||||
]
|
||||
@@ -44,6 +44,7 @@ export class DMService {
|
||||
private onNewConnId(newConnId: string) {
|
||||
console.log("NetworkService: New connection id")
|
||||
this.client.defaults.headers["X-WS-ID"] = newConnId;
|
||||
this.joinWebSocketRoom().then()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -244,7 +245,7 @@ export class DMService {
|
||||
*/
|
||||
async joinWebSocketRoom(): Promise<void> {
|
||||
try {
|
||||
const resp = await this.client.patch("chat/dm/joinWebSocketRoom", <JoinWsRoomReq>{
|
||||
await this.client.post("v2/chat/dm/joinWebSocketRoom", <JoinWsRoomReq>{
|
||||
chatid: this.chatid,
|
||||
userid: this.userid,
|
||||
connId: WebSocketHandler.getInstance().connId,
|
||||
|
||||
Reference in New Issue
Block a user