diff --git a/.changeset/shaggy-shirts-rule.md b/.changeset/shaggy-shirts-rule.md new file mode 100644 index 00000000..f4f9418d --- /dev/null +++ b/.changeset/shaggy-shirts-rule.md @@ -0,0 +1,5 @@ +--- +"nxjs-runtime": patch +--- + +Make `Application#id` return the "PresenceGroupId" instead of "SaveDataOwnerId" diff --git a/packages/runtime/src/switch/ns.ts b/packages/runtime/src/switch/ns.ts index 15884664..d03abf2a 100644 --- a/packages/runtime/src/switch/ns.ts +++ b/packages/runtime/src/switch/ns.ts @@ -29,7 +29,7 @@ function _init() { */ export class Application { /** - * The 64-bit unique identifier of the application. + * The 64-bit unique identifier of the application (`PresenceGroupId`). */ declare readonly id: bigint; diff --git a/source/ns.c b/source/ns.c index 150807e3..baa4da09 100644 --- a/source/ns.c +++ b/source/ns.c @@ -102,7 +102,7 @@ static JSValue nx_ns_app_id(JSContext *ctx, JSValueConst this_val, int argc, JSV { return JS_EXCEPTION; } - return JS_NewBigUint64(ctx, app->data.nacp.save_data_owner_id); + return JS_NewBigUint64(ctx, app->data.nacp.presence_group_id); } static JSValue nx_ns_app_nacp(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)