@nativesquare/soma 0.16.8 → 0.16.9

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/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "bugs": {
7
7
  "url": "https://github.com/NativeSquare/soma/issues"
8
8
  },
9
- "version": "0.16.8",
9
+ "version": "0.16.9",
10
10
  "license": "Apache-2.0",
11
11
  "keywords": [
12
12
  "convex",
@@ -305,15 +305,16 @@ export class SomaStrava {
305
305
  updates?: Record<string, unknown>;
306
306
  };
307
307
  const rawEventName = `${p.object_type}-${p.aspect_type}`;
308
+ const authorizedFlag = p.updates?.authorized;
308
309
  const isDeauthorize =
309
310
  rawEventName === "athlete-update" &&
310
- String(p.updates?.authorized) === "false";
311
+ (authorizedFlag === false || String(authorizedFlag) === "false");
311
312
  const eventName = (isDeauthorize
312
313
  ? "athlete-deauthorize"
313
314
  : rawEventName) as StravaWebhookEventName;
314
315
 
315
316
  console.log(
316
- `[soma:strava:webhook] received eventName=${eventName} ownerId=${p.owner_id} objectId=${p.object_id}`,
317
+ `[soma:strava:webhook] received eventName=${eventName} ownerId=${p.owner_id} objectId=${p.object_id} rawPayload=${JSON.stringify(payload)}`,
317
318
  );
318
319
 
319
320
  if (!webhookCfg.events?.[eventName]) {