Move relay action items to top of page

This commit is contained in:
Jon Staab
2026-03-19 12:41:23 -07:00
parent 1f5be54cb1
commit f9c7ed4936
7 changed files with 142 additions and 158 deletions
+3 -3
View File
@@ -917,7 +917,8 @@ export const deriveSpaceActionItems = (url: string) =>
},
]),
$events => {
const getRoomId = (e: TrustedEvent) => getTagValue(e.kind === ROOM_MEMBERS ? "d" : "h", e.tags)
const getRoomId = (e: TrustedEvent) =>
getTagValue(e.kind === ROOM_MEMBERS ? "d" : "h", e.tags)
const reports = $events.filter(e => e.kind === REPORT)
const pendingJoins: TrustedEvent[] = []
@@ -938,8 +939,7 @@ export const deriveSpaceActionItems = (url: string) =>
).filter(({pubkey, created_at}) => {
if (roomMembers.includes(pubkey)) return false
if (gt(roomMembersEvent?.created_at, created_at)) return false
if (roomLeaves.some(e => e.pubkey === pubkey && e.created_at > created_at))
return false
if (roomLeaves.some(e => e.pubkey === pubkey && e.created_at > created_at)) return false
return true
}),