Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: autofill name based on username or let it be empty

Divyaswor Makai93d382f25feb
diff --git a/apps/backend/src/api/routes/integrations.controller.ts b/apps/backend/src/api/routes/integrations.controller.ts
index e19e86685..4beb234b3 100644
--- a/apps/backend/src/api/routes/integrations.controller.ts
+++ b/apps/backend/src/api/routes/integrations.controller.ts
@@ -408,9 +408,17 @@ export class IntegrationsController {
);
}
+ let validName = name;
+ if (!validName) {
+ if (username) {
+ validName = username.split('.')[0];
+ } else {
+ validName = '';
+ }
+ }
return this._integrationService.createOrUpdateIntegration(
org.id,
- name,
+ validName,
picture,
'social',
String(id),