Try to send message before its attachments
One way to do this would be to set the timestamp of the attachments 1
greater than the timestamp of the message itself, so in the common case the message would be sent first. There's no guarantees because of retransmission etc, but usually that would give the result we want.