On Wed, 2010-03-03 at 15:10 -0500, Craig Andrews wrote:

> However, with your implementation approach, you would have 5 functions to
> modify, and all would create a headers array and pass that along, and the
> code for these 5 functions would be very similar. Is there another way you
> could do this, perhaps in the mail_to_user() function itself, so that the
> headers array is created once? That way, when we want to add new items, it
> will be easier, and new code won't have to copy/paste how to create the
> headers array from existing code.

Sorry I didn't provide full details of the implementation, I was just
discussing the potential problem areas.  I was planning to implement a
function "_prepare_headers($msg_type, $to, $from, $domain)" which would
prepare the array and this function would be called in the 5 functions.
Stuffing it into mail_to_user() isn't very flexible, for example in the
future you might want to add an extra header to mentions which adds the
the id of the dent it is in reply to.

I thought if I put much more detail in my original message I might as
well have attached an untested patch for feedback :)

Cheers

Dave

_______________________________________________
StatusNet-dev mailing list
[email protected]
http://lists.status.net/mailman/listinfo/statusnet-dev

Reply via email to