Define a consistent way to turn message id into thread id hash