ferdi
ferdi copied to clipboard
[Bug]: unread message badge broken in Zulip
Preflight Checklist
- [X] I have read the Contributing Guidelines for this project.
- [X] I agree to follow the Code of Conduct that this project adheres to.
- [X] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Ferdi Version
5.8.1
Recipe Name
zulip
Recipe Version
latest
Last Known working version of the recipe
It did work but a Zulip upgrade broke it
Steps to reproduce
- Add a zulip service
- have some unread message showing in zulip
- No unread badge appear
Expected Behavior
Unread messages badge should show
Actual Behavior
Unread messages do not show
Screenshots
No response
Additional Information
Actual JS recipe contain this in webview.js:
module.exports = Ferdi => {
const getMessages = () => {
const allMessages = Math.round(
document.querySelectorAll(
'#global_filters .top_left_all_messages .count .value',
)[0].textContent,
);
Ferdi.setBadge(allMessages);
};
Ferdi.loop(getMessages);
};
Replacing with this restore functionality:
module.exports = Ferdi => {
const getMessages = () => {
const allMessages = Math.round(
document.querySelectorAll(
'#global_filters .top_left_all_messages',
)[0].children[0].children[2].textContent
);
Ferdi.setBadge(allMessages);
};
Ferdi.loop(getMessages);
};