diff options
author | Colin Okay <cbeok@protonmail.com> | 2020-04-12 12:35:17 -0500 |
---|---|---|
committer | Colin Okay <cbeok@protonmail.com> | 2020-04-12 12:35:17 -0500 |
commit | 4289cbc9c027700cca18689d74674eecc17ac5b6 (patch) | |
tree | cf42762a10d2aebfba4ed67ad84462ee81331857 | |
parent | af85b3ae5b11b68cd0bad553041f67915fbea20b (diff) |
send-image-message
-rw-r--r-- | granolin.lisp | 8 | ||||
-rw-r--r-- | package.lisp | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/granolin.lisp b/granolin.lisp index 561aa0e..b8ea6a9 100644 --- a/granolin.lisp +++ b/granolin.lisp @@ -436,6 +436,14 @@ :|body| (apply #'format (list* nil message args))))) (send (client url body :wrap make-basic-json) t))) +(defun send-image-message (client room-id alt-text mxc-uri) + (let ((url (format nil +text-message-path+ room-id (txn-id client))) + (body (list :|msgtype| "m.image" + :|body| alt-text + :|url| mxc-uri + ))) + (send (client url body :wrap make-basic-json) t))) + (defun join-room (client room-id) "Attempts to join the client to the room with ROOM-ID." (let ((body (list :|roomId| room-id)) diff --git a/package.lisp b/package.lisp index c5f2414..9b5434f 100644 --- a/package.lisp +++ b/package.lisp @@ -81,6 +81,7 @@ #:login #:sync #:send-text-message + #:send-image-message #:join-room #:create-direct-message-room #:upload |