HomePhabricator
Diffusion Comm 7c5f9a1240e5

[server] Move condition to unset TRUNCATED to where TRUNCATED is set

Description

[server] Move condition to unset TRUNCATED to where TRUNCATED is set

Summary: Instead of setting it in one place, and then conditionally unsetting it later... we should probably just check the condition in the first place.

Test Plan:

  1. I tested different values of defaultMaxMessageAge such that some threads would return fewer than defaultNumberPerThread, and some threads would return 0
  2. I tested threads that needed a fetchMostRecentMessages, and threads that needed multiple fetchMessagesBeforeCursor to get to the start
  3. I made sure all threads loaded all the way to the start of a thread if I kept scrolling

Reviewers: palys-swm, atul

Reviewed By: palys-swm

Subscribers: Adrian, karol-bisztyga, benschac

Differential Revision: https://phabricator.ashoat.com/D3412

Details

Provenance
ashoatAuthored on Mar 11 2022, 11:19 AM
Reviewer
tomek
Differential Revision
D3412: [server] Move condition to unset TRUNCATED to where TRUNCATED is set
Parents
rCOMM362a843ed259: [server] Don't unset TRUNCATED if threadCursor is null
Branches
Unknown
Tags
Unknown