From de07dc9fa40b420b8c559671ef59b77ceb7a6426 Mon Sep 17 00:00:00 2001 From: zlshames Date: Tue, 7 Jun 2022 15:11:13 -0400 Subject: [PATCH 1/4] Contact avatar fixes --- .../server/src/server/api/v1/interfaces/contactInterface.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/server/src/server/api/v1/interfaces/contactInterface.ts b/packages/server/src/server/api/v1/interfaces/contactInterface.ts index 580e23ff..b7d0ae49 100644 --- a/packages/server/src/server/api/v1/interfaces/contactInterface.ts +++ b/packages/server/src/server/api/v1/interfaces/contactInterface.ts @@ -71,7 +71,10 @@ export class ContactInterface { }: { extraProps?: string[] } = {}): any { - return records.map((e: NodeJS.Dict) => { + return records.map((contact: NodeJS.Dict) => { + // We have to make a copy so that when we "delete", we aren't deleting from the master copy. + const e = { ...contact }; + // Only include extra properties that are asked for. for (const prop of ContactInterface.apiExtraProperties) { if (!extraProps.includes(prop) && Object.keys(e).includes(prop)) { From 367a0448378f40a39c656f474b964df7d1c7bd86 Mon Sep 17 00:00:00 2001 From: zlshames Date: Sat, 11 Jun 2022 13:39:16 -0400 Subject: [PATCH 2/4] Fixes empty chat participants in Chat Query endpoint --- packages/server/src/server/api/v1/interfaces/chatInterface.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/server/src/server/api/v1/interfaces/chatInterface.ts b/packages/server/src/server/api/v1/interfaces/chatInterface.ts index 6ae776c6..1b56d4ea 100644 --- a/packages/server/src/server/api/v1/interfaces/chatInterface.ts +++ b/packages/server/src/server/api/v1/interfaces/chatInterface.ts @@ -32,9 +32,7 @@ export class ChatInterface { const tmpChats = await Server().iMessageRepo.getChats({ chatGuid: guid as string, withParticipants: true, - withArchived, - offset, - limit + withArchived }); for (const chat of tmpChats) { From 62b0d2924a25fc0a4f886f11fa6af6ad72ea8d7a Mon Sep 17 00:00:00 2001 From: zlshames Date: Tue, 7 Jun 2022 16:01:07 -0400 Subject: [PATCH 3/4] Fixes some deprecation warnings --- packages/server/src/server/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/server/src/server/index.ts b/packages/server/src/server/index.ts index 70ae5472..afe605a3 100644 --- a/packages/server/src/server/index.ts +++ b/packages/server/src/server/index.ts @@ -1067,8 +1067,8 @@ class BlueBubblesServer extends EventEmitter { // Disconnect & reconnect to the iMessage DB if (this.iMessageRepo.db.isConnected) { this.log("Reconnecting to iMessage database..."); - await this.iMessageRepo.db.close(); - await this.iMessageRepo.db.connect(); + await this.iMessageRepo.db.destroy(); + await this.iMessageRepo.db.initialize(); } await this.stopServices(); From d917d83ca6114e324355926f896509bb1df102a6 Mon Sep 17 00:00:00 2001 From: zlshames Date: Sat, 11 Jun 2022 13:40:34 -0400 Subject: [PATCH 4/4] Version bump for patch --- package.json | 2 +- packages/server/package.json | 2 +- packages/ui/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 4a8aa5f2..2c1ecdc3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bluebubbles-server", - "version": "1.1.2", + "version": "1.1.3", "description": "BlueBubbles Server is the app that powers the BlueBubbles app ecosystem", "private": true, "workspaces": [ diff --git a/packages/server/package.json b/packages/server/package.json index 581a1be0..78fa2cbf 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@bluebubbles/server", - "version": "1.1.2", + "version": "1.1.3", "main": "./dist/main.js", "license": "Apache-2.0", "author": { diff --git a/packages/ui/package.json b/packages/ui/package.json index 8778ade7..ab533742 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@bluebubbles/ui", - "version": "1.1.2", + "version": "1.1.3", "homepage": "./", "license": "Apache-2.0", "scripts": {