Larry "The Al Pacino of Analogy" Gilbert (l2g) wrote in lj_textmessage,
Larry "The Al Pacino of Analogy" Gilbert

Maximum message lengths and robustness

I noticed something while testing LJ::TextMessage by messaging myself. If I didn't enforce the length of a message and deliberately sent myself one that was too long, it wouldn't come through. This is because the Verizon gateway drops messages on the floor if they're too long, no errors or anything.

It seems to me that the module should do some enforcement on its own in case the application using it chooses not to (or screws up in some other way). The send() function already silently truncates the "from" field if it's too long. My idea is that it could also return an error if either the message or the combined message + "from" is too long. (Or it could truncate the message, but I think returning an error is better as it gives more immediate and useful feedback.)

I've already made some experimental changes that will do this, and tested them. If interested, let me know.

  • Cricket

    I am considering having Cricket as a cell carrier, but I noticed that they're listed as unsupported with LiveJournal. That post, however, is about 5…

  • AT&T and Cingular

    Cingular Blue doesn't exist any more, it can be removed. Cingular is now AT&T. It's correctly configured with a max of 160 characters but entering…

  • Helio

    I just recently got a Helio phone and I'm hoping to get this phone on the list of supported carriers. You can send email SMS to…

  • Post a new comment


    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 1 comment