Hi all,

I've just signed up to the list, but have been using status.net via
identi.ca for a year or so.  I wrote my first plugin last month -
http://davehall.com.au/blog/dave/2010/02/20/group-redent-plugin-statusnet-identica
  Now I feel like I am ready to contribute something back to the core, even 
though there is a fair bit of self interest in the contribution.

I would like to see status.net (and identi.ca) support X mail headers
for messages sent from the service.  I would propose the following
headers

X-StatusNet-Domain: <site-fqdn>
X-StatusNet-TargetUser: <nickname>
X-StatusNet-SourceUser: <nickname>
X-StatusNet-MessageType: (message|subscribe|nudge|fave|mention)

This would allow for easy mail filtering of status.net messages.  I'm
happy to change any of the above if people think that there is a better
way of doing it, I just this kept it pretty simple.

While looking through the code I noticed that the function
mail_to_user() (lib/mail.php 141 in my current dev env) would need to be
modified to allow the adding of headers to messages when the function is
called.  I would propose that instead of the 4th argument being $headers
= array, that $address = null becomes the forth argument and $headers is
inserted as the 3rd, like so:
function mail_to_user(&$user, $subject, $body, $headers = array(),$address=null)

I am proposing this as only 2 functions call this method using the
address argument, so they can be easily patched, yet 5 functions will be
calling the function with the headers argument.  Think the most common
uses should involve the simplest calls.

I'd like some feedback on this before starting to hack on it.

Cheers

Dave

_______________________________________________
StatusNet-dev mailing list
StatusNet-dev@lists.status.net
http://lists.status.net/mailman/listinfo/statusnet-dev

Reply via email to