Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 8db02c3

Browse files
committed
Handle 3 element invite code tags
1 parent 1788e01 commit 8db02c3

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

mutiny-core/src/nostr/mod.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1630,7 +1630,16 @@ impl<S: MutinyStorage> NostrManager<S> {
16301630
// remove any invite codes that point to different federation
16311631
.filter(|c| c.federation_id() == federation_id)
16321632
} else {
1633-
None
1633+
// tag might have `fedimint` element, try to parse that as well
1634+
let vec = tag.as_vec();
1635+
if vec.len() == 3 && vec[0] == "u" && vec[2] == "fedimint" {
1636+
InviteCode::from_str(&vec[1])
1637+
.ok()
1638+
// remove any invite codes that point to different federation
1639+
.filter(|c| c.federation_id() == federation_id)
1640+
} else {
1641+
None
1642+
}
16341643
}
16351644
})
16361645
.collect();

0 commit comments

Comments
 (0)