Skip to content

Commit 70a8818

Browse files
committed
send real app version from loops client
1 parent 7a1ad95 commit 70a8818

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

packages/api-client/src/posthog-client.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ export function setPosthogApiClientAppVersion(version: string): void {
117117
clientAppVersion = version;
118118
}
119119

120+
export function getPosthogApiClientAppVersion(): string {
121+
return clientAppVersion;
122+
}
123+
120124
export class SandboxCustomImagesDisabledError extends Error {
121125
constructor(message?: string) {
122126
super(message ?? "Custom sandbox images are not enabled");

packages/ui/src/features/loops/hooks/useLoopsClient.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { buildApiFetcher, createApiClient } from "@posthog/api-client";
22
import type { ApiClient } from "@posthog/api-client/generated";
3+
import { getPosthogApiClientAppVersion } from "@posthog/api-client/posthog-client";
34
import { useHostTRPCClient } from "@posthog/host-router/react";
45
import { getCloudUrlFromRegion } from "@posthog/shared";
56
import { useMemo } from "react";
@@ -41,7 +42,7 @@ export function useLoopsClient(): LoopsApiClient | null {
4142
hostClient.auth.refreshAccessToken
4243
.mutate()
4344
.then((r) => r.accessToken),
44-
appVersion: "unknown",
45+
appVersion: getPosthogApiClientAppVersion(),
4546
}),
4647
baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl,
4748
);

0 commit comments

Comments
 (0)