diff --git a/mattermost.el b/mattermost.el index b4e500b..926aadc 100644 --- a/mattermost.el +++ b/mattermost.el @@ -132,7 +132,7 @@ if the user is not present" "Builds a Mattermost request and returns the JSON response" (let ((url-request-method method) (url-request-extra-headers `(("Content-Type" . "application/json"))) - (url-request-data (if body (json-serialize body)))) + (url-request-data (if body (encode-coding-string (json-serialize body) 'utf-8)))) (if mattermost-token (add-to-list 'url-request-extra-headers `("Authorization" . ,(concat "Bearer " mattermost-token)))) (with-current-buffer (url-retrieve-synchronously (concat "https://" mattermost-host "/api/v4" url) t)