From 9df0939d0fc02318905d3c67c589aece8481a6b3 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Sat, 18 Apr 2020 08:40:08 -0500 Subject: utf-8 external format in send and sync messages --- granolin.lisp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/granolin.lisp b/granolin.lisp index 4a9c7cf..f1ce5c3 100644 --- a/granolin.lisp +++ b/granolin.lisp @@ -254,7 +254,9 @@ :additional-headers (add-auth-header ,client ,headers) :method ,method :content ,content - :content-type ,content-type) + :content-type ,content-type + :external-format-out :utf-8 + :external-format-in :utf-8) (if (= 200 *response-status*) (let ((*response-object* (,wrap @@ -279,7 +281,9 @@ (drakma:http-request (make-matrix-path ,client ,path) :additional-headers (add-auth-header ,client ,headers) :parameters ,params - :method :get) + :method :get + :external-format-out :utf-8 + :external-format-in :utf-8) (if (= 200 *response-status*) (let ((*response-object* (,wrap @@ -295,7 +299,7 @@ ;;; API Calls -(defun login (client user password) +(defun login (client user password &key (device-name "Granolin")) "Logs CLIENT into its HOMESERVER withthe provided USER and PASSWORD. If successful, sets the ACCESS-TOKEN of the CLIENT. Otherwise raises an @@ -304,7 +308,7 @@ :|identifier| (list :|type| "m.id.user" :|user| user) :|password| password - :|initial_device_display_name| "Granolin"))) + :|initial_device_display_name| device-name))) (send (client +login-path+ body :method :post -- cgit v1.2.3