@jiggai/kitchen-plugin-marketing 0.2.11 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/handler.js +6 -2
- package/package.json +1 -1
package/dist/api/handler.js
CHANGED
|
@@ -289,7 +289,11 @@ var BaseDriver = class {
|
|
|
289
289
|
try {
|
|
290
290
|
const integrations = await getPostizIntegrations(this.config.postiz);
|
|
291
291
|
const match = integrations.find(
|
|
292
|
-
(i) =>
|
|
292
|
+
(i) => {
|
|
293
|
+
const id = (i.identifier || i.providerIdentifier || "").toLowerCase();
|
|
294
|
+
const target = this.postizProvider.toLowerCase();
|
|
295
|
+
return !i.disabled && (id === target || id.startsWith(target + "-") || id.startsWith(target + "_"));
|
|
296
|
+
}
|
|
293
297
|
);
|
|
294
298
|
if (match) {
|
|
295
299
|
this._postizIntegrationId = this.config.postiz.integrationId || match.id;
|
|
@@ -297,7 +301,7 @@ var BaseDriver = class {
|
|
|
297
301
|
connected: true,
|
|
298
302
|
backend: "postiz",
|
|
299
303
|
displayName: match.name || `${this.label} (Postiz)`,
|
|
300
|
-
username: match.username,
|
|
304
|
+
username: match.profile || match.username,
|
|
301
305
|
avatar: match.picture,
|
|
302
306
|
integrationId: match.id
|
|
303
307
|
};
|