We should validate this in the constructor
Is this endpoint implemented in zooid or does this depend on a PR to add it?
Much better, thanks. We can leave off the shadows (to fit the current design), but this is good enough to move to dev.
This ternary logic is halfway duplicated between callers and deriveHasPermission, since that function also takes into account deriveUserIsSpaceAdmin. I think a clean way to handle this would be to push the h tag check down by making it optional in deriveHasPermission. This will drastically simplify all our permission checks.
Same here, no need for getLatest, just use the zero or one event provided. That means you can remove getLatestEventByKind too
I don't understand the purpose of snapshots, couldn't you just use the latest event of each kind and parse members on demand? Or do you expect that to be computationally intensive? It seems odd to couple roles/members/admins like this instead of access each individually. Since this function is used in only one place it might just make sense to fold the logic in there to avoid the entire idea of snapshots.
This function exists already in core/state
Same thing here, which means you can remove deriveRoomListStore
This seems unnecessary to me, isn't this taken into account by deriveUserSpacePermissions?
The permissions.size is here because this assumes permissions aren't filled for the space admin, but I think that is actually done in the roles file.
Looks very good, just a few more nitpicks
A few things:
- npub should be right below the name rather than the nip05 domain. In fact, I think we should probably not show the nip05 at all.
- The wot indicator should remain the same…