Page MenuHomePhabricator

[lib] generate message store ops for threads after sending message
ClosedPublic

Authored by kamil on Apr 13 2023, 7:33 AM.
Tags
None
Referenced Files
F2829140: D7418.diff
Fri, Sep 27, 3:28 PM
Unknown Object (File)
Wed, Sep 25, 1:59 PM
Unknown Object (File)
Wed, Sep 18, 2:43 PM
Unknown Object (File)
Tue, Sep 3, 9:26 PM
Unknown Object (File)
Wed, Aug 28, 10:38 PM
Unknown Object (File)
Aug 26 2024, 2:49 AM
Unknown Object (File)
Aug 26 2024, 2:18 AM
Unknown Object (File)
Aug 17 2024, 9:50 AM
Subscribers

Details

Summary

This code generates operations needed for updating threads part of message store after message was sent with success.

Depends on D7417

Test Plan

Try to send message (with success) using different flows on both web and native

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Apr 13 2023, 8:28 AM
tomek added inline comments.
lib/reducers/message-reducer.js
1248
1256

Does it make sense to spread it here?

1267–1270

Shouldn't we use processedMessageStore.threads or something?

This revision is now accepted and ready to land.Apr 17 2023, 5:36 AM

remove spread operator and rebase

lib/reducers/message-reducer.js
1248

I don't think that's a good change, single thread is what's defined by threadID key, this object:

{
        ...messageStore.threads[threadID],
        messageIDs: newMessageIDs,
},

This right here is the threads object (but I agree it will have one key).
With this change later I will have to use: payload: { threads: updatedThread }, which I think is more confusing.

1256

looks like not - thanks for pointing

1267–1270