Public chat is both replayed and also collapsed. Since replayed messages don't send chat message events, all replayed messages would be filtered due to the last message id not being updated for any of them. Instead, set all stored messages ids to -1 on login, since the ids are invalidated anyway, and then use it to not collapse replayed chat.