Yōten: A social tracker for your language learning journey built on the atproto.

fix(oauth/posthog): log on successful signin #29

merged opened by brookjeynes.dev targeting master from push-poxuyvkkpyyz
Labels

None yet.

Participants 1
AT URI
at://did:plc:4mj54vc4ha3lh32ksxwunnbh/sh.tangled.repo.pull/3m4dafbrcue22
+10 -8
Diff #0
+10 -8
internal/server/oauth/handler.go
··· 135 135 l.Debug("created profile record", "uri", atresp.Uri) 136 136 137 137 if !o.Config.Core.Dev { 138 - err = o.Posthog.Enqueue(posthog.Capture{ 139 - DistinctId: sessData.AccountDID.String(), 140 - Event: ph.UserSignInSuccessEvent, 141 - }) 142 - if err != nil { 143 - l.Error("failed to enqueue posthog event", "err", err) 144 - } 145 - 146 138 properties := posthog.NewProperties(). 147 139 Set("display_name", resolved.Handle.String()). 148 140 Set("language_count", 0). ··· 170 162 } 171 163 } 172 164 165 + if !o.Config.Core.Dev { 166 + err = o.Posthog.Enqueue(posthog.Capture{ 167 + DistinctId: sessData.AccountDID.String(), 168 + Event: ph.UserSignInSuccessEvent, 169 + }) 170 + if err != nil { 171 + l.Error("failed to enqueue posthog event", "err", err) 172 + } 173 + } 174 + 173 175 http.Redirect(w, r, "/", http.StatusFound) 174 176 }

History

1 round 0 comments
sign up or login to add to the discussion
brookjeynes.dev submitted #0
1 commit
expand
fix(oauth/posthog): log on successful signin
expand 0 comments
pull request successfully merged