Zionnite
hello guys, i want to list through my subscribers but it not working, below is my code:
TypeScript
const resultMsgAllList = await messaging.listSubscribers(
GENERAL_TOPIC_ALL,
[
Query.limit(1),
Query.equal('targetId', userTargets[i].$id),
],
);
const resultMsgAll = resultMsgAllList.subscribers;
for(let j=0; j<resultMsgAll.length; j++){
let subscriberId = resultMsgAll[j].$id;
//delete subscription,
const result = await messaging.deleteSubscriber(
GENERAL_TOPIC_ALL, // topicId
subscriberId // subscriberId
);
//then create again
const resultCreate = await messaging.createSubscriber(
GENERAL_TOPIC_ALL, // topicId
ID.unique(), // subscriberId
userTargets[i].$id // targetId
);
}
}catch(errors){
error({
"errors":errors,
"depth":"list general topic all level"
});
}```
please is there anything i'm not doing well?
TL;DR
Developers are receiving an output error when listing subscribers. The code provided seems to attempt to list and modify subscribers, but it's not working. The error message `{"errors":{},"depth":"list general topic all level"}` is being returned.
Solution: The developers could check for potential issues in the listSubscribers function or the code logic for listing and modifying subscribers. It might be helpful to review the messaging API documentation or reach out to technical support for assistance. Zionnite
i'm getting this in the output {"errors":{},"depth":"list general topic all level"}
Recommended threads
- Got message for auto payment of 15usd fo...
how did this happen? 1. i claimed my 50usd credits via jsm hackathon - https://hackathon.jsmastery.pro/ 2. it asked me which org. to apply the credits on, i se...
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...