[lib] Keep pending threads when new messages are received
[lib] Keep pending threads when new messages are received

Summary: We need to make that all the pending threads are treated as watched, so we keep them and failed messages included in them.

Test Plan: Send a failed message to a pending thread on one device and open a different thread. On the second device send a message to any of the threads with 1st user as a member. On the first device open the same pending thread and check if the message is still there.

Reviewers: ashoat

Reviewed By: ashoat

Subscribers: KatPo, Adrian, atul

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

Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal,Ashoat/squadcal