Skip to content

Commit d826a3b

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 4a602dd + f8486e6 commit d826a3b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

apps/backend/src/api/routes/integrations.controller.ts

+9-1
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,17 @@ export class IntegrationsController {
441441
);
442442
}
443443

444+
let validName = name;
445+
if (!validName) {
446+
if (username) {
447+
validName = username.split('.')[0] ?? username;
448+
} else {
449+
validName = `Channel_${String(id).slice(0, 8)}`;
450+
}
451+
}
444452
return this._integrationService.createOrUpdateIntegration(
445453
org.id,
446-
name,
454+
validName.trim(),
447455
picture,
448456
'social',
449457
String(id),

0 commit comments

Comments
 (0)