From aaa132662f31587cddcac9b4815b0956329db3b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lombardo?= Date: Thu, 17 Aug 2023 20:27:09 -0300 Subject: [PATCH] Channel participants now use the reindexed index --- docs/CHANGELOG.md | 1 + pipeline/process/DatabaseBuilder.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 28f448ce..ea8b94a3 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,5 +1,6 @@ # v1.0.4 (YYYY/MM/DD) [IN DEVELOPMENT] +- Bugfix: DM/Group channel labels (Alice & Bob) were showing an invalid picture. - Added calls support for Discord and Telegram: [#76](https://github.com/mlomb/chat-analytics/issues/76) [#88](https://github.com/mlomb/chat-analytics/pull/88) - Time spent on calls over time - Number of calls initiated over time diff --git a/pipeline/process/DatabaseBuilder.ts b/pipeline/process/DatabaseBuilder.ts index ffeb901c..93b8ba42 100644 --- a/pipeline/process/DatabaseBuilder.ts +++ b/pipeline/process/DatabaseBuilder.ts @@ -329,7 +329,10 @@ export class DatabaseBuilder { type: channel.type, avatar: channel.avatar, guildIndex: this.guildsRank[this.guilds.getIndex(channel.guildId)!], - participants: participants.length > 0 ? participants : undefined, + participants: + participants.length > 0 + ? participants.map((oldAuthorIndex) => this.authorsRank[oldAuthorIndex]) + : undefined, // the following are set making the final messages msgAddr: undefined,