Prevent loading old messages twice on scroll
Prevent loading old messages twice on scroll

Whenever the old messages are already loading initially when opening a
conversation, a scroll event might call getOldMessages again which would
cancel the previous one.

The initial old messages load is using includeLastKnown=1 while the others use
0. So if it gets cancelled, we will miss the "last known" message as it
won't be included in subsequent calls.

This fix prevents repeated calls to getOldMessages to avoid the above
issue.

Signed-off-by: Vincent Petry <87e1f221a672a14a323e57bb65eaea19d3ed3804@nextcloud.com>

nextcloud/spreed,nextcloud/spreed,nextcloud/spreed