fastsupply / growl

Automatically exported from code.google.com/p/growl
0 stars 0 forks source link

Messages from nobody have an icon from the Address Book #117

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Receive a message from nobody (From header empty).

What is the expected output?
The notification has Mail's icon.

What do you see instead?
The notification has the icon of the last contact in the Address Book who does 
not have an email 
address set.

Reported by Scott on the discuss list. 
http://groups.google.com/group/growldiscuss/t/62fe3dd8a27a159

Original issue reported on code.google.com by prhgr...@gmail.com on 17 Apr 2010 at 4:52

GoogleCodeExporter commented 9 years ago
We search the AB for whatever email address is in the From header, without 
considering that it may be the 
empty string. AB, for its part, apparently does not have a notion of a contact 
without an email address; such a 
contact has an email address that is the empty string. Thus, our search for the 
empty string finds such 
contacts—hence, the problem.

The solution, as I see it, is to test whether the alleged email address is one. 
Message.framework currently 
makes NSStrings respond to -isLegalEmailAddress; as long as that's true, we can 
use that. If that ever 
changes, we can test whether the string contains an ‘@’ character. (We also 
don't want to waste the AB 
framework's time with strings containing only spaces, or other garbage.)

Original comment by prhgr...@gmail.com on 17 Apr 2010 at 4:57

GoogleCodeExporter commented 9 years ago

Original comment by prhgr...@gmail.com on 17 Apr 2010 at 4:58

GoogleCodeExporter commented 9 years ago
Fixed: http://growl.info/hg/growl-development/rev/c5b5af891333

Original comment by prhgr...@gmail.com on 17 Apr 2010 at 5:23