Skip to content

feat: update message pending tasks#1716

Merged
isekovanic merged 3 commits intomasterfrom
feat/update-message-pending-tasks
Apr 2, 2026
Merged

feat: update message pending tasks#1716
isekovanic merged 3 commits intomasterfrom
feat/update-message-pending-tasks

Conversation

@isekovanic
Copy link
Copy Markdown
Contributor

CLA

  • I have signed the Stream CLA (required).
  • Code changes are tested

Description of the changes, What, Why and How?

This PR introduces support for adding message updates as a pending task whenever we are offline and persisting it. It goes hand in hand with an extended pending task API through updatePendingTask (living in the UI SDK implementation currently).

The flow is as follows:

  • If we're online, we simply update the message
  • If we're offline and the message is an already successful one, we simply queue up the pending task
  • If we're offline and the message is a failed one (for example, we send a message while offline and then immediately edit it), we update the send-message pending task with the new data
    • When this happens, we make sure to not change the message_text_changed_at property so that the newly sent message does not appear as edited

This comes with a couple of caveats:

  • Attachments are out of scope, since currently our async uploads feature still lives on the UI SDK (once that gets moved to the LLC we can support that too)
    • Offline updates containing attachments will simply be skipped
  • The optimistic updates still live in the UI SDK, their move towards the LLC will come in the next 2 quarters gradually

Changelog

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 2, 2026

Size Change: +2.71 kB (+0.74%)

Total Size: 369 kB

📦 View Changed
Filename Size Change
dist/cjs/index.browser.js 123 kB +913 B (+0.75%)
dist/cjs/index.node.js 124 kB +901 B (+0.73%)
dist/esm/index.mjs 122 kB +901 B (+0.74%)

compressed-size-action

@isekovanic isekovanic merged commit af87ae2 into master Apr 2, 2026
4 checks passed
@isekovanic isekovanic deleted the feat/update-message-pending-tasks branch April 2, 2026 14:56
github-actions bot pushed a commit that referenced this pull request Apr 2, 2026
## [9.40.0](v9.39.0...v9.40.0) (2026-04-02)

### Features

* update message pending tasks ([#1716](#1716)) ([af87ae2](af87ae2))
@stream-ci-bot
Copy link
Copy Markdown

🎉 This PR is included in version 9.40.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

isekovanic added a commit to GetStream/stream-chat-react-native that referenced this pull request Apr 2, 2026
## 🎯 Goal

This PR is the RN SDK counterpart of [this
change](GetStream/stream-chat-js#1716).

In addition to the description there, it also:

- Includes optimistic updates for updating a message
- Makes sure the DB is up to date

## 🛠 Implementation details

<!-- Provide a description of the implementation -->

## 🎨 UI Changes

<!-- Add relevant screenshots -->

<details>
<summary>iOS</summary>


<table>
    <thead>
        <tr>
            <td>Before</td>
            <td>After</td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <!--<img src="" /> -->
            </td>
            <td>
                <!--<img src="" /> -->
            </td>
        </tr>
    </tbody>
</table>
</details>


<details>
<summary>Android</summary>

<table>
    <thead>
        <tr>
            <td>Before</td>
            <td>After</td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>
                <!--<img src="" /> -->
            </td>
            <td>
                <!--<img src="" /> -->
            </td>
        </tr>
    </tbody>
</table>
</details>

## 🧪 Testing

<!-- Explain how this change can be tested (or why it can't be tested)
-->

## ☑️ Checklist

- [ ] I have signed the [Stream
CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform)
(required)
- [ ] PR targets the `develop` branch
- [ ] Documentation is updated
- [ ] New code is tested in main example apps, including all possible
scenarios
  - [ ] SampleApp iOS and Android
  - [ ] Expo iOS and Android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants