April 11th, 2003

Me in the sun

LJ::TextMessage - phone number punctuation removal

http://zilla.livejournal.org/show_bug.cgi?id=241

Stripping all non-digit characters from phone numbers breaks providers that don't use all-numbers as the user-specific part, for example, with O2 you actually have to put your O2 username on editinfo.bml instead of your phone number. Using $self->{'number'} =~ s/\D//g deletes the entire left-hand-side of the email address in these cases.

Currently I've only thought of one work around, but it'd be kinda ugly, and I'd like some feedback before i actually go ahead and do this...

What we could do is have an extra setting defined for each provider, for example:
providername=>{'alldigits' => 1}

Which could then turn on or turn off the punctuation stripping as necessary. This could result in providers such as O2 being broken if we're not aware that they're using usernames (although, we should be able to get most of them via the /tools/textmessage.bml?mode=details page )

Thoughts? Ideas?
  • Current Music
    Chocolate Puma - I Wanna Be You