Use binary_to_integer/1, integer_to_binary/1
Implement getting a MT message by id