Skip to content

Commit

Permalink
## v0.2.37
Browse files Browse the repository at this point in the history
- Added index { "app_id": 1, "conversWith": 1} to ChatDB to improve performance of deleteConversationsByConversWith()
  • Loading branch information
Andrea Sponziello committed Mar 10, 2024
1 parent 7e188cc commit 5933742
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
available on:
▶️ https://www.npmjs.com/package/@chat21/chat21-http-server

## v0.2.37
- Added index { "app_id": 1, "conversWith": 1} to ChatDB to improve performance of deleteConversationsByConversWith()

## v0.2.36
- Added endpoint /:app_id/:group_id/conversations/timelines. This endpoint removes all the conversations, from all timelines - belonging to a specific group-id
Expand Down
3 changes: 3 additions & 0 deletions chatdb/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ class ChatDB {
this.db.collection(this.conversations_collection).createIndex(
{ 'timelineOf':1, "app_id": 1, "timestamp": 1, "archived": 1 }
);
this.db.collection(this.conversations_collection).createIndex(
{ "app_id": 1, "conversWith": 1}
);
this.db.collection(this.groups_collection).createIndex(
{ 'uid':1 }
);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@chat21/chat21-http-server",
"version": "0.2.36",
"version": "0.2.37",
"description": "Chat21 HTTP APIs",
"main": "index.js",
"dependencies": {
Expand Down

0 comments on commit 5933742

Please sign in to comment.