[lib] Introduce useGetLatestMessageEdit
Summary:
Now that we're exposing getRelatedMessages from SQLite instead of useGetLatestMessageEdit, we need some business logic on the JS side to construct the "latest message edit". We do this by swapping in the text of the latest edit, similar to how the equivalent code in keyserver works.
This diff replaces D12762.
Depends on D12740
Test Plan: In combination with the next diff, I tested a patch on both native and web that hit this code with a specific message ID and confirmed that it returned the message with the latest edit swapped in
Reviewers: kamil, tomek, marcin
Reviewed By: tomek
Subscribers: inka
Differential Revision: https://phab.comm.dev/D12764