Skip to content

In unsubscribed channel, handle that message-send/edit events are not expected #1798

@chrisbobbe

Description

@chrisbobbe

Clients don't get send-message or edit-message events in unsubscribed channels.

There are three behaviors that feel especially buggy that we'd like to fix, with special handling when the channel is unsubscribed.

See discussion: #mobile > Message sending in unsubscribed channels @ 💬

The unsubscribed-channel views will be more visible with

so milestoning this issue to match that one.

First buggy behavior, reproducer and fix:

  1. Open an unsubscribed-channel view
  2. Write and send a message, or edit an existing message
  3. When the update succeeds, it doesn't show right away. You can see it by closing/reopening the view, or by opening the view in a different client, like the web app.

At (3) we should re-fetch the view automatically once we get a success response:

  • If you sent a message, anchor at the newest message
  • If you edited a message, anchor at that message

Second buggy behavior, reproducer and fix:

  1. Open an unsubscribed-channel view
  2. Someone else sends or edits a message
  3. You don't see the update, even if you're expecting it. You can see it if you close/reopen the view, but there's no hint in the UI that updates won't come through or that this is a workaround.

To fix, we'll show a banner with text like this (modeled on the web app's):

You are not subscribed to this channel. Replies to your messages will not appear automatically.

and the banner will have "Refresh" and "Subscribe" buttons.

Third buggy behavior, reproducer and fix:

  1. Open an unsubscribed-channel view
  2. Write and send a message, or edit an existing message
  3. When the update succeeds, you can see it by closing/reopening the view (or in a more ergonomic way after the fixes described above)…but the newly-sent or -edited message is accompanied by a copy of itself, and that copy has a loading spinner that doesn't go away.

To fix, we should clear the outbox state for the message when the send/edit request succeeds, without waiting for the event. (Just for unsubscribed channels.)

Metadata

Metadata

Assignees

Labels

a-msglistThe message-list screen, except what's label:a-content

Type

No type

Projects

Status

No status

Relationships

None yet

Development

No branches or pull requests

Issue actions