mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-06-05 18:21:28 +02:00
fix: pass proper ProtocolIdentifier object when opening group chats
GroupLink was passing a string identifier instead of a properly structured
ProtocolIdentifier object, causing chat window to fail opening.
Fixed to pass:
{
protocol: "nip-29",
identifier: {
type: "group",
value: groupId,
relays: [relayUrl]
}
}
This matches the expected ChatViewer props interface and allows the
NIP-29 adapter to properly resolve the conversation with the group relay.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -57,9 +57,15 @@ export function GroupLink({
|
||||
: undefined;
|
||||
|
||||
const handleClick = () => {
|
||||
// Open chat with NIP-29 format: relay'group-id
|
||||
const identifier = `${relayUrl}'${groupId}`;
|
||||
addWindow("chat", { protocol: "nip-29", identifier });
|
||||
// Open chat with properly structured ProtocolIdentifier
|
||||
addWindow("chat", {
|
||||
protocol: "nip-29",
|
||||
identifier: {
|
||||
type: "group",
|
||||
value: groupId,
|
||||
relays: [relayUrl],
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const displayName = formatGroupIdForDisplay(groupName);
|
||||
|
||||
Reference in New Issue
Block a user