diff options
author | Colin Okay <cbeok@protonmail.com> | 2020-04-17 17:11:09 -0500 |
---|---|---|
committer | Colin Okay <cbeok@protonmail.com> | 2020-04-17 17:11:09 -0500 |
commit | 779724b008624e96793cb282b8803aeb56c97c21 (patch) | |
tree | b517a37cba61ed55534909cf6eeb06a19ca17e76 | |
parent | 19cf57760ce6a612a68b6b2e65933ceca4bbec97 (diff) |
added send-video-message funciton
-rw-r--r-- | granolin.lisp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/granolin.lisp b/granolin.lisp index 3768426..7de5f58 100644 --- a/granolin.lisp +++ b/granolin.lisp @@ -436,9 +436,11 @@ :|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 - &key info - ) +(defun send-image-message (client room-id alt-text mxc-uri &key info ) + "Sneds an m.image style message to the a room. + + See https://matrix.org/docs/spec/client_server/r0.6.0#m-image for + documentaiton aobut the :info argument." (let ((url (format nil +text-message-path+ room-id (txn-id client))) (body (list :|msgtype| "m.image" :|body| alt-text @@ -447,6 +449,19 @@ ))) (send (client url body :wrap make-basic-json) t))) +(defun send-video-message (client room-id alt-text mxc-uri &key info) + "Sends a video message to a room using the mxc-uri that should have + been returned from a previous upload to the server. + +See https://matrix.org/docs/spec/client_server/r0.6.0#m-video for +information about the :info argument." + (let ((url (format nil +text-message-path+ room-id (txn-id client))) + (body (list :|msgtype| "m.video" + :|body| alt-text + :|url| mxc-uri + :|info| info))) + (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)) |