Skip to content

Commit

Permalink
chore(deps): Update posthog-js to 1.68.2 (PostHog#16155)
Browse files Browse the repository at this point in the history
  • Loading branch information
posthog-bot authored Jun 20, 2023
1 parent 3414f8e commit e9ec59f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 24 deletions.
13 changes: 2 additions & 11 deletions frontend/src/lib/components/CommandPalette/commandPaletteLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -574,17 +574,8 @@ export const commandPaletteLogic = kea<commandPaletteLogicType>({
icon: IconRecording,
display: 'Debug: Copy the session recording link to clipboard',
executor: () => {
const LOOK_BACK = 30
const recordingStartTime = Math.max(
Math.floor(
(new Date().getTime() - (posthog?.sessionManager?._sessionStartTimestamp || 0)) / 1000
) - LOOK_BACK,
0
)
void copyToClipboard(
`${window.location.origin}/recordings/${posthog?.sessionRecording?.sessionId}?t=${recordingStartTime}`,
'Current session recording link to clipboard'
)
const url = posthog.get_session_replay_url({ withTimestamp: true, timestampLookBack: 30 })
void copyToClipboard(url, 'Current session recording link to clipboard')
},
},
}
Expand Down
10 changes: 4 additions & 6 deletions frontend/src/lib/components/Support/supportLogic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,10 @@ import { preflightLogic } from 'scenes/PreflightCheck/preflightLogic'
import { teamLogic } from 'scenes/teamLogic'

function getSessionReplayLink(): string {
const LOOK_BACK = 30
const recordingStartTime = Math.max(
Math.floor((new Date().getTime() - (posthog?.sessionManager?._sessionStartTimestamp || 0)) / 1000) - LOOK_BACK,
0
)
const link = `http://go/session/${posthog?.sessionRecording?.sessionId}?t=${recordingStartTime}`
const link = posthog
.get_session_replay_url({ withTimestamp: true, timestampLookBack: 30 })
.replace(window.location.origin + '/replay/', 'http://go/session/')

return `Session: ${link} (at ${window.location.href.replace(/&supportModal=.+($|&)?/, '$1')})`
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"kea-window-values": "^3.0.0",
"md5": "^2.3.0",
"monaco-editor": "^0.39.0",
"posthog-js": "1.67.1",
"posthog-js": "1.68.2",
"posthog-js-lite": "2.0.0-alpha5",
"prettier": "^2.8.8",
"prop-types": "^15.7.2",
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e9ec59f

Please sign in to comment.