I have the following situation:
Alice has started a room by herself and sends some messages.
Bob joins that room.
I want to send Bob the messages Alice wrote. I try to use the monitoring plugin to achieve this. I query for the last like 10 minutes of history and receive most of the messages. I send those to Bob. The problem is that the last minute or so of messages is missing.
I assume the problem lies within the plugin:
The archiveTask in ConversationManager is set to run every minute, so it persists the incoming messages every minute.
When I query the plugin for the messages of the last ten minutes I directly uses the persistence manager to get those messages, but I obviously miss those that are not persisted.
Is there any way I can work around that or fix it?
A horrible hack I thought of was implementing the manual save of xep0136 and manually save the messages before Bob tries to get the messages.