def top_notifications(request):
    if request.user.is_anonymous():
        return {}
    return {
        "notifications_check_interval":
        int(parameters.get_admin("TOP_NOTIFICATIONS_CHECK_INTERVAL")) * 1000,
        "top_notifications": events.raiseQueryEvent(
            "TopNotifications", request, False)
    }
A context processor to include top notifications.
dataset/ETHPy150Open tonioo/modoboa/modoboa/core/context_processors.py/top_notifications