vanto/tb-personal-level-indicator

Email address matching case sensitive

Closed this issue · 2 comments

After using this I found that it did not always show the arrows when expected.

After a bit of looking I found that it was case sensitive when doing the mail address matching.
For example:

After looking at the code I came up with this (as a patch - not well tested, but works for me so far):

--- pli_column_overlay.js       2011-05-29 10:25:10.381382900 +1000
+++ pli_column_overlay.js.fixed 2011-05-29 10:25:07.490665400 +1000
@@ -72,7 +72,7 @@
                const emails = new Array;
                const count = this.headerParser.parseHeadersWithArray(data, addrs, names, fulls);
                for (var i = 0; i < count; i++) {
-                       emails.push(addrs.value[i]);
+                       emails.push(addrs.value[i].toLowerCase());
                }
                return emails;
        },

(After a LOT of looking and testing and general mucking around and even reading the help I could not figure out for the life of me how to get this to display correctly, so here it is at pastebin as well so you can actually read it as a diff: http://pastebin.com/aF0pDavE )

Thanks for the great add-on!

PS: When I went here from the Mozilla add-ons page I couldn't figure out how to simply download an .xpi file. So I ended up getting the .zip version, extracting, then recompressing up one level and renaming from a .zip to a .xpi. May be I'm just dumb (and my efforts with the damn markup above may be proof of this), but I couldn't see an easy way to get an .xpi file. It would be great to have one, or a short how-to linked from the readme shown on the tb-personal-level-indicator landing page.

Cheers.

Hi,

thanks for the patch. I have modified it slightly to also catch the case where the own identity is spelled differently. Having it applied and released as v0.5, email addresses should be handled fully case insensitive by now.

I also uploaded the new and older releases as .xpi to github, so it should be easier now to find new versions. The review process at Mozilla is currently pretty slow.

Thanks,
Tammo

Cheers!

Thanks for the fast response and the .xpi's - much easier :)

Agreed re the Mozilla review process - I wish there was something I could do to help it hurry up - I submitted a new dictionary (compatible with FF4) over 2 months ago and it is still not approved.

Cheers,
Trent