Forum OpenACS Development: Re: Problem with notifications from Bug-Tracker

Collapse
Posted by Dave Bauer on
Yes, you'll need to call that proc to get the party_id. There may be cases where the addresses will not have party_ids. I guess that depends on whether any applications let you enter arbitraty addresses instead of using parties.

The old complex_send code did this, you can probably look in the CVS history in complex-procs for some ideas.

Collapse
Posted by Richard Hamilton on
Dave,

The complex_send code still exists. My reading of this is that the simple send process is only now invoked if the message is being sent my a user with a party_id, however I have no idea if this is indeed the case.

I can clearly see the potential for unregistered users to be able to send a message out, although in that case they should probably have to register. Even if they are simply asked for their email address I think the complex_send code would then handle it.

I really need to chat to someone who is close to that code. Who would be able to confirm or refute those assumptions?

R.

Collapse
Posted by Emmanuelle Raffenne on
Hi Richard,

Sorry for being late to this thread.

I'm the one who refactored acs-mail-lite code, so I guess I'm the maintainer since then.

Just to confirm Dave's answer, complex_send is not part of core since openacs 5.4.0. Since then, acs_mail_lite::send doesn't accept a party_id as sender anymore but an email address instead. Thus, an unregistered user can send out an email message.

The signature of the acs_mail_lite::send callback has been modified accordingly (i.e. accepting an email address instead of a party_id). I'm aware that other packages like mail-tracking have implementations for this callback that follow the old signature, but I didn't modify them since I'm not the maintainer and users may use code previous to 5.4.0 or local copy of complex_send. Anyhow, those changes have been described at the forums back then.

Collapse
Posted by Richard Hamilton on
Emmanuelle,

That's great - thanks for the information. That is really helpful and makes good sense.

On that basis then, all that is needed in each case is a check of whether the various arguments to be passed to the mail procs are integer keys or not. If so, look up the email address.

I guess in an ideal world, the mail procs would sort this out for themselves based on whatever value is passed, but the problem is as you say, that the signature of the call itself has changed.

Is it possible for a non-registered user to submit a bug?

I will modify my copy of the files relevant to the bug-tracker notifications and inevitably the mail tracking package but need to work out how to capture that and feed it back to the codebase. I presume I can checkout a single file and then commit it back in isolation?

On that score, does anyone know who the maintainer is for mail-tracking?

Collapse
Posted by Emmanuelle Raffenne on
Richard,

I'm not familiar with the bug tracker package as a developer. However as an user, I need to login to submit a bug, at least on this server.

acs-mail-lite::send won't accept user_id, even in an ideal world :), because 1. it's not responsible for looking up the email address for an user, 2. the sender would need to be a registered user in all cases.