This is a more appropriate version of D13797: Only add actual documents to Recent Documents. Basically we filter out anything that can't be browsed with a file manager, such as web linkns, appstream:// urls, etc.
This ensures that the contents of the recentdocuments:/ ioslave is relevant to the user.