Skip to content

πŸ“£ Android: Announcement and Channel presetsΒ #6415

Description

@nickvergessen

Overview

Channel (channel preset, attribute 8) β€” broadcasting to a potentially huge audience:

  • Only moderators can post, everybody else can only react.
  • Permissions are a default, so individuals can still be granted the chat permission.
  • Calls are impossible for everyone, including moderators.
  • The participants list is only available to moderators.
  • System messages are not shown (client-side only).
  • Listable for users by default.

Announcement (announcement preset, attributes 8|16 = 24) β€” a channel with extra rules:

  • Everything a channel does, unless contradicted below.
  • Not listable by default.
  • Non-moderators can not leave; moderators can, and can still remove others.
  • Notifies about all messages by default (changeable afterwards).

Capability announcement-preset indicates the existence and support of both presets. A conversation is a channel when TalkRoom.attributes & 8 (the CHANNEL bit) is set, and an announcement when TalkRoom.attributes & 16 (the ANNOUNCEMENT bit) is set. An announcement is a channel with additional restrictions, so it always has both bits set β€” every channel behavior below therefore applies to announcements as well, and attributes & 8 is the only check needed for the shared parts.

Detection

  • Detect channels via TalkRoom.attributes & 8 and announcements via TalkRoom.attributes & 16; only apply this behavior when the announcement-preset capability is present.
  • Add channel and announcement to CONVERSATION.PRESET in src/constants.ts and give them an icon in presetIcons (NewConversationSetupPage.vue).

Channels (also applies to announcements)

  • Do not render system messages in channel conversations. (frontend-only, no backend block)
  • Hide the participants list / tab for non-moderators β€” the list can be enormous. (backend returns 403 on GET /room/{token}/participants, so do not call it)
  • Hide the call buttons and the whole call UI. Calls are impossible for everyone, including moderators: the backend strips PERMISSIONS_CALL_START/PERMISSIONS_CALL_JOIN from permissions and reports canStartCall: false, and joining a call returns 403.
  • Show that only moderators can post: non-moderators get permissions without PERMISSIONS_CHAT (128) but with PERMISSIONS_REACT (256), so the message composer should be replaced by a reaction-only affordance. Individual participants can still be granted the chat permission, so always follow the actual permissions value rather than assuming.

Announcements only

  • Hide the "Leave conversation" action for non-moderators β€” canLeaveConversation is false for them and DELETE /room/{token}/participants/self returns 400 announcement. Moderators can still leave and can still remove other participants.
  • The notification level defaults to "all messages" (1) for users added to an announcement. It is only a default, so the notification settings must stay editable.

Metadata

Metadata

Assignees

Labels

Fields

No fields configured for Enhancement.

Projects

Status
πŸ“„ To do (~10 entries)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions