Sort archive messages by date (and only then by id)
fix #3337
Because apparently the IDs are not always incrementing. We still use them to
know the order of two messages that were received at the same second (in
this case, the ID will always be incrementing).
Fix the actual_bind versions for integrals
Fix a memory leak when psql connection fails
Support the <before/> element in MAM requests
Do not forget an early return, to return the correct item-not-found error
Use the same function for both history orders
Send a item-not-found error when the “after” value is not in the archive
Handle the “after” RSM value to page through results
e2e test that the last uuid is the same as the “last” value in the iq result
Always return the oldest matching messages from MAM, even if no date is set
Add a check for GCC’s and Clang’s minimal versions
Fix conversion warnings on 32 bits
Fix argument types in declaration of send_history_message
Remove the debug logs from previous commit
Add a ifndef USE_DATABASE guard around send_history_message
Add the complete='true' attribute only when appropriate
Do not forget the complete='true' attribute in MAM’s result iq
Correctly include the database header
And an other conversion warning