Skip to content

Commit 26276ef

Browse files
authored
Removing redundant last activity plain in weekly emails conversations (#154)
1 parent 09c0478 commit 26276ef

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

backend/.env.dist.composed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ CROWD_DB_WRITE_HOST="db"
2020
CROWD_SEARCH_ENGINE_HOST="http://search-engine:7700"
2121

2222
# CubeJS settings
23-
CROWD_CUBEJS_URL="http://cubejs:4000"
23+
CROWD_CUBEJS_URL="http://cubejs:4000/cubejs-api/v1"

backend/.env.dist.local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ CROWD_DB_PASSWORD=example
4343
CROWD_DB_DATABASE=crowd-web
4444

4545
# CubeJS settings
46-
CROWD_CUBEJS_URL=http://localhost:4000
46+
CROWD_CUBEJS_URL=http://localhost:4000/cubejs-api/v1
4747
CROWD_CUBEJS_JWT_SECRET=137ea167812145c6d77452a58d7dd29b
4848
CROWD_CUBEJS_JWT_EXPIRY=2h
4949

backend/src/serverless/microservices/nodejs/analytics/workers/weeklyAnalyticsEmailsWorker.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ async function weeklyAnalyticsEmailsWorker(tenantId: string): Promise<AnalyticsE
5757
c.platformPretty = platformDisplayNames[c.platform]
5858

5959
const conversationLazyLoaded = await conversationService.findById(c.id)
60-
const lastActivity =
60+
61+
c.lastActivity =
6162
conversationLazyLoaded.activities[conversationLazyLoaded.activities.length - 1]
62-
c.lastActivity = lastActivity.get({ plain: true })
63-
c.lastActivity.username = lastActivity.member.username[c.platform]
63+
c.lastActivity.username = c.lastActivity.member.username[c.platform]
6464

6565
if (c.lastActivity.body) {
6666
c.lastActivity.body = convertHtmlToText(c.lastActivity.body)

0 commit comments

Comments
 (0)