Set muc_restore_timeout to 0 = request the maximum available lines
Phenomenon
muc_restore_timeout entry in the ACE
Background analysis
Screenshots attached (Gajim vs. MCabber)
Implementation recommendation
Setting up muc_restore_timeout to 0 will make Gajim to request all the availanle lines that the server has kept
But, on the other hand, I'm not so sure, because if the server has kept 1,000,000 lines then it would be a problem, to say the least.