Hello @SocialPlus_Support.
I’m currently using PostRepository.getPosts to retrieve video, image, and text posts. According to the documentation, to fetch all types of posts, I should omit the ‘dataTypes’ parameter in the request parameters.
Here’s the code snippet in question:
const params: Amity.PostLiveCollection = {
targetId: userId,
targetType: 'user',
//dataTypes: ['image', 'video'],
sortBy: 'lastCreated',
limit: 8,
};
The problem I’m encountering is that when I remove the ‘dataTypes’ parameter, all the returned posts have their ‘dataType’ property set to ‘text’. However, when I uncomment ‘dataTypes’ in my request parameters, I receive posts with the correct ‘dataType’ values, such as ‘video’ and ‘image’.
It’s crucial for the ‘dataType’ property to be accurate because I use it to categorize user posts.
Thank you for your assistance.
Current TS-SDK: 6.4.5
I tested the latest version of the TS-SDK and observed the same behavior.