I am looking at how I might combine Notifications, Messaging, and the Message module.

It looks to me like a new Notification type, with the ability for some Messaging mechanisms to provide a container for the message based on Message Type.

Has anyone put any thought or work into this?

Comments

amitaibu’s picture

Can you share your use case -- how do you see Message being used in the notifications?

Grayside’s picture

Let me preface this by saying I'm working with Message in D7 for my personal site, but this (and other forthcoming issues) are bound to D6.

I want to use Message as a primary message store for a big site. It will be used to track a variety of user events and actions, some specific to our user stories.

All events will be recorded as Messages, and from there used to populate Views, RSS feeds, and trigger Notifications. So Message will need to provide one or more Notifications types. I haven't dug too far into that end of things yet, so hopefully I'm not too far off base in how I describe what I see as technical difficulties.

  1. A given Message Type will need to be opted in for user notifications, as opposed to being limited to usage around the site itself. So node_create messages might notify users of events, but email_update messages might not.
  2. Individual message instances can be "overridden" to not send a notification. For example, users might have a checkbox "Do not send a notification for this update", but still show that the update occurred in activity listings.
  3. Because we are likely to have messages stored for multiple realms (user, group, taxonomy term, and more), there needs to be a way of identifying an event uniquely for notification so users are not spammed. To this end I think there needs to be an event_id of some kind. I don't know if hijacking the 'extra' field is a good idea. Some kind of logic in how the notifications are integrated will check for event ids and only send one of the messages per user out for that event.
amitaibu’s picture

I need to think about it, but:
There is no longer an extra field. Message Type is a fieldable entity - which means you can attach a "Use for notification" checkbox; You can assign "user reference" to mark the users that already got the message; You can have a user reference to users that still didn't see the message, etc'

Grayside’s picture

Assigned: Unassigned » Grayside

I'm stuck in D6 for this functionality. I would gladly work on the D7 angle with an idea toward backporting, but the amount of extra work in building with and without entities seems like it might add too much overhead to my timeline. If we can identify a solution that would be somewhat portable but swapping out the crud sort of stuff, that is a possibility.

Grayside’s picture

EDIT: I just saw message_realm is already in a separate table, showing my forgetfulness. Perhaps the Event ID won't be needed.

amitaibu’s picture

Grayside,
D6 is obviously more limited than the D7 version. It sounds that all this "meta-data" if you wish to add in D6 will need their own tables. D7 might use similar logic but benefit form fields.

Grayside’s picture

Are you open to new features in D6 ahead of D7?

(By the way, I would be delighted to add this to the OG patches for a Chicago conversation if you've time.)

Grayside’s picture

Assigned: Grayside » Unassigned
bluegeek9’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)