Hello,
We are currently exploring the Amity Community SDK for an integration with our App. I have a couple of questions regarding the use of de observePost method, as I’m not able to obtain the expected behavior.
useEffect(() => {
if(amityConfiguration.communityId){
return observePosts(
{
targetId: amityConfiguration.communityId,
targetType: 'community',
},
{
onReactionAdded: post => {
console.log(post);
setPosts([post]);
},
onUpdate: post => {
console.log(post);
setPosts([post]);
},
onEvent: (onEvent, post) => {
console.log(post)
}
},
);
}
}, [connected]);
So far the observer functions are not triggering when a Post contained in the community is updated. Could you point me in the right direction?