Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions frontend/common/stores/account-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,16 @@ const controller = {
API.setCookie('organisation', `${id}`)
store.organisation = find(store.model.organisations, { id })
getStore().dispatch(setSelectedOrganisationId(id))
// Keep the org-scoped traits pointing at the organisation on screen, so
// org-scoped segments are evaluated against it. setTraits rather than
// identify: the identity is unchanged, so bucketing is undisturbed.
flagsmith
.setTraits({
'organisation.id': String(id),
'organisation.name': store.organisation?.name ?? '',
'subscription.plan': store.organisation?.subscription?.plan ?? '',
})
.catch(() => {})
Comment thread
Zaimwa9 marked this conversation as resolved.
store.changed()
identifyChatUser()
},
Expand Down
Loading