Your user ID should be in a separate hidden field, such as:
Your message input shouldn't have an id of user-id and shouldn't need data-user-id at all.
Data attributes are used by JavaScript. Hidden inputs pass values to PHP that the user doesn't need to see. Neither are truly hidden to the user.