Client Script / frappe.publish_realtime v14

hello
i have code in the client script about real-time publish alert, it’s works fine in specific doctype, but I need to show this alert in all doctypes, I need it global, I created a new file js and put my code, but when make the action alert not show!?

file path :slight_smile:
myapp/public/js/custom_notification.js

in hooks:
/assets/myapp/js/custom_notification.js

file custom_notification.js

frappe.realtime.on('pending_ticket_notification', function(data) {
    frappe.show_alert({
        message: data.message,
        indicator: data.indicator || 'green'
    }, 15);
});

i have the same issue

Any Help?