Invitation messages can be displayed in the wrong order
When devices have slightly inaccurate clocks, an invitation response can have an earlier timestamp than the corresponding request. This causes the messages to be displayed in the wrong order in both parties' conversations, so the invitation seems to have been accepted before it was sent.
One possible solution is for the sender to set the timestamp of the response to max(timestamp of request + 1, current time) when creating the response.
Another possible solution is for the recipient to set the metadata timestamp of the response to max(timestamp of request + 1, timestamp of response) in the delivery hook. This could backfire if the message timestamp is used in some places and the metadata timestamp is used in others.