[lib][native][web] Ignore showInMessagePreview if no messages found
Summary:
This diff does two things:
- Updates useGetMessageInfoForPreview so that it falls back to the old behavior if it fails to find a message to preview that passes showInMessagePreview. This allows us to avoid showing "No messages". This is "Potential solution 2" described on Linear here.
- Updates useGetMessageInfoForPreview to also return shouldFetchOlderMessages, a flag that indicates to the caller if the fallback described above occurred. This will allow us to implement "Potential solution 3" from the Linear comment linked above.
Test Plan:
Tested in combination with the rest of the stack:
- Make sure membership operations (user joining / leaving) don't appear in MessagePreview
- Make sure reactions to the viewer's messages still appear in MessagePreview
- Make sure reactions to other user's messages don't appear in MessagePreview
- Test fresh login to thread with only one message in the last 14 days, which is a reaction to a non-viewer message. Make sure the reaction initially appears in MessagePreview, but then is replaced after more messages are fetched by the client
Reviewers: tomek
Reviewed By: tomek
Differential Revision: https://phab.comm.dev/D13830