Compare commits
2 Commits
1.0.7
...
d04bd6a437
| Author | SHA1 | Date | |
|---|---|---|---|
| d04bd6a437 | |||
| 0e553767b6 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@chatenium/chatenium-sdk",
|
||||
"version": "1.0.7",
|
||||
"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()
|
||||
}),
|
||||
]
|
||||
@@ -39,7 +39,6 @@ export class DMService {
|
||||
onNewConnId: this.onNewConnId,
|
||||
onNewMessage: wsMessageListener,
|
||||
})
|
||||
this.joinWebSocketRoom().then()
|
||||
}
|
||||
|
||||
private onNewConnId(newConnId: string) {
|
||||
@@ -244,9 +243,9 @@ export class DMService {
|
||||
/**
|
||||
* Joins the WebSocket room to start receiving realtime messages
|
||||
*/
|
||||
private async joinWebSocketRoom(): Promise<void> {
|
||||
async joinWebSocketRoom(): Promise<void> {
|
||||
try {
|
||||
const resp = await this.client.patch("v2/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