Skip to content

Commit 5574e61

Browse files
committed
fix: comment
Signed-off-by: Uroš Marolt <uros@marolt.me>
1 parent 9d2873f commit 5574e61

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

services/apps/data_sink_worker/src/service/activity.service.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,8 +335,8 @@ export default class ActivityService extends LoggerBase {
335335
activity.username = identities[0].value
336336
} else if (identities.length === 0) {
337337
// Fall back to same-platform email identity — handles old gerrit records where
338-
// only a type:email identity was stored (before parse-member.ts gained the
339-
// email-as-username fallback).
338+
// only a type:email identity was stored (before the gerrit integration
339+
// gained the email-as-username fallback).
340340
const emailFallback = activity.member.identities.find(
341341
(i) => i.platform === platform && i.type === MemberIdentityType.EMAIL && i.value,
342342
)
@@ -465,7 +465,13 @@ export default class ActivityService extends LoggerBase {
465465
if (!success) {
466466
resultMap.set(resultId, { success: false, err })
467467
} else {
468-
relevantPayloads.push(single(payloads, (a) => a.resultId === resultId))
468+
const payload = single(payloads, (a) => a.resultId === resultId)
469+
if (!payload.activity.username) {
470+
// prepareMemberData found no usable identity — mark as processed and skip.
471+
resultMap.set(resultId, { success: true })
472+
} else {
473+
relevantPayloads.push(payload)
474+
}
469475
}
470476
}
471477

0 commit comments

Comments
 (0)