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.
  • 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