Skip to content

Commit

Permalink
🐛 Add subject authors to workspace (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
foysalit authored Sep 26, 2024
1 parent 488d232 commit 9bcdce2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions components/mod-event/useModEventList.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
AtUri,
ChatBskyConvoDefs,
ComAtprotoAdminDefs,
ComAtprotoRepoStrongRef,
Expand Down Expand Up @@ -269,6 +270,15 @@ export const useModEventList = (
}
} else if (showWorkspaceConfirmation === 'creators') {
items.add(event.createdBy)
} else if (showWorkspaceConfirmation === 'subject-authors') {
if (
ComAtprotoAdminDefs.isRepoRef(event.subject) ||
ChatBskyConvoDefs.isMessageRef(event.subject)
) {
items.add(event.subject.did)
} else if (ComAtprotoRepoStrongRef.isMain(event.subject)) {
items.add(new AtUri(event.subject.uri).host)
}
}
})

Expand Down

0 comments on commit 9bcdce2

Please sign in to comment.