def send_post_notifications(obj, event):
    if event.action != 'publish':
        return

    workspace = obj.aq_parent
    while not IWorkspace.providedBy(workspace):
        workspace = workspace.aq_parent

    messenger = IMessenger(workspace)

    recipients = workspace.getMemberIds()
    for uid in recipients:
        if messenger.getAttrForUid(uid, 'recieveNotifications', True):
            try:
                messenger.notifyAboutNewPost(uid, obj)
            except:
                pass