If any telegraph company, or an officer, agent, operator, or employee of any such company or association, shall refuse or wilfully omit to transmit a dispatch tendered by an officer of this state, or of the United States, which by law is required to be given immediate dispatch, for the price of ordinary communications of the same length, or shall designedly alter or falsify the same for any purpose whatever, such company or such officer, agent, operator, or employee, shall, on conviction, be fined not exceeding two thousand dollars, or imprisoned in the county jail not exceeding one year, or both.