Skip to content

Commit dd1bef8

Browse files
authored
Fix serve ID not considered for in-band syncs (#848)
1 parent 7dd63d1 commit dd1bef8

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

.changeset/lovely-oranges-return.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"inngest": patch
3+
---
4+
5+
Fix serve ID not considered for in-band syncs

packages/inngest/src/components/InngestCommHandler.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,12 @@ export class InngestCommHandler<
366366

367367
this.frameworkName = options.frameworkName;
368368
this.client = options.client as Inngest.Any;
369+
370+
if (options.id) {
371+
console.warn(
372+
`${logPrefix} The \`id\` serve option is deprecated and will be removed in v4`
373+
);
374+
}
369375
this.id = options.id || this.client.id;
370376

371377
this.handler = options.handler as Handler;
@@ -1627,7 +1633,7 @@ export class InngestCommHandler<
16271633
});
16281634

16291635
const body: InBandRegisterRequest = {
1630-
app_id: this.client.id,
1636+
app_id: this.id,
16311637
appVersion: this.client.appVersion,
16321638
capabilities: registerBody.capabilities,
16331639
env,
@@ -1700,7 +1706,7 @@ export class InngestCommHandler<
17001706
...introspection,
17011707
authentication_succeeded: true,
17021708
api_origin: this.apiBaseUrl,
1703-
app_id: this.client.id,
1709+
app_id: this.id,
17041710
capabilities: {
17051711
trust_probe: "v1",
17061712
connect: "v1",

packages/inngest/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,7 @@ export interface RegisterOptions {
850850
/**
851851
* The ID of this app. This is used to group functions together in the Inngest
852852
* UI. The ID of the passed client is used by default.
853+
* @deprecated Will be removed in v4.
853854
*/
854855
id?: string;
855856
}

0 commit comments

Comments
 (0)