mirror of
https://github.com/block/buzz.git
synced 2026-11-03 07:51:22 +00:00
The serverless membership event only stored bare ['p', pubkey] tags with no role, so every member — including the channel creator — read back as 'member'. This hid the member-invite card on private channels (it requires owner/admin) and diverged from server mode, where the relay assigns the creator 'owner'. Store roles as the 4th p-tag element (['p', pubkey, '', role]) — the NIP-29 convention channel_members_from_event already reads. Creator = owner; new members default to 'member'; role changes remove+re-add; existing members keep their role across read-modify-write. Matches server-mode data shape.