Skip to content

Commit

Permalink
Ozone: pass through unknown account details (bluesky-social#2794)
Browse files Browse the repository at this point in the history
* ozone: pass through account info details that may not be known yet

* tidy, build
  • Loading branch information
devinivy authored Sep 6, 2024
1 parent c5b765d commit 71785d3
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-push-ozone-aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
push:
branches:
- main
- service-auth-scopes
- divy/ozone-passthru
env:
REGISTRY: ${{ secrets.AWS_ECR_REGISTRY_USEAST2_PACKAGES_REGISTRY }}
USERNAME: ${{ secrets.AWS_ECR_REGISTRY_USEAST2_PACKAGES_USERNAME }}
Expand Down
30 changes: 23 additions & 7 deletions packages/ozone/src/api/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,31 @@ export const addAccountInfoToRepoViewDetail = (
includeEmail = false,
): RepoViewDetail => {
if (!accountInfo) return repoView
const {
email,
deactivatedAt,
emailConfirmedAt,
inviteNote,
invitedBy,
invites,
invitesDisabled,
// pick some duplicate/unwanted details out
did: _did,
handle: _handle,
indexedAt: _indexedAt,
relatedRecords: _relatedRecords,
...otherAccountInfo
} = accountInfo
return {
...otherAccountInfo,
...repoView,
email: includeEmail ? accountInfo.email : undefined,
invitedBy: accountInfo.invitedBy,
invitesDisabled: accountInfo.invitesDisabled,
inviteNote: accountInfo.inviteNote,
invites: accountInfo.invites,
emailConfirmedAt: accountInfo.emailConfirmedAt,
deactivatedAt: accountInfo.deactivatedAt,
email: includeEmail ? email : undefined,
invitedBy,
invitesDisabled,
inviteNote,
invites,
emailConfirmedAt,
deactivatedAt,
}
}

Expand Down

0 comments on commit 71785d3

Please sign in to comment.