Skip to content

channels: hide revoked shared channels from the channel list (historical messages keep them visible), and decide case handling of proposal names #251

Description

@dborup

Relates to #99, #196, #232

Problem

On production (v0.2.1, with channelProposals.autoApprove on) an administrator revoked a shared channel, but it stayed in the channel list:

Time (UTC) Event
09:38:39 #HelloWorld suggested and auto-approved
09:41:31 #helloworld suggested and auto-approved
09:41:57 one message on #helloworld received and decrypted
09:44:19 / 09:44:43 both revoked (removed from channel keys)

After the revoke, #helloworld is gone from approvedChannels and is no longer decrypted. It still shows in GET /api/channels (messageCount: 1) and in the channel list, because the already-decoded message is stored. That matches the documented contract ("Historical messages already decoded and stored are NOT deleted or hidden"). For an administrator who revokes a channel to get rid of it, though, the result looks like the revoke failed. The channel only disappears once the message ages out of packet retention.

A second issue is visible in the same timeline: #HelloWorld and #helloworld became two separate proposals and two approvals.

Proposal

  1. Hide revoked channels from the channel list. A channel whose proposal is revoked, and that is not decrypted through the built-in or config list, should be left out of GET /api/channels. The server does not delete anything (it stays read-only); it only filters. Optionally offer a toggle or an admin view to still see them.
    • Decide the behaviour for a channel that is revoked and later re-approved: it is shown again, with its history.
    • Make sure a channel that the ingestor decrypts through hashChannels, channelKeys or the rainbow table is never hidden by a revoked proposal for the same name.
  2. Case in proposal names. Check in the MeshCore firmware or companion app source how hashtag channel secrets are derived from the name, and whether the name is case-sensitive.
    • If the key derivation is case-insensitive (or the apps normalise case): normalise proposal names, so that #HelloWorld and #helloworld are one proposal.
    • If it is case-sensitive: keep them separate, but show the administrator that a near-duplicate exists. Do not guess: cite the source.

Acceptance

  • After a revoke, the channel disappears from GET /api/channels and the channel list within one refresh, even though historical messages exist. A test covers this.
  • Re-approval shows it again. A built-in or config-decrypted channel with the same name is never hidden.
  • Case handling of proposal names is decided from the firmware or app source and pinned by a test.
  • The API docs (openapi.go, docs/api-spec.md) describe the new behaviour. cmd/server stays read-only.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions