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.i'm getting this in the output {"errors":{},"depth":"list general topic all level"}
Recommended threads
- All My Project is Gone
Hello everyone, please help. Why have all my projects suddenly disappeared? I received a warning via email about one of my projects being paused. When I clicked...
- > AppwriteException: The requested servi...
When trying to read or write from my database I get the following error: > AppwriteException: The requested service is disabled. You can enable the service from...
- 500 Server error
getting same 500 status This is my appwrite project: https://cloud.appwrite.io/console/project-fra-691932db0036241caa0e/overview/platforms Help how to open th...