diff options
author | Colin Okay <cbeok@protonmail.com> | 2020-04-18 09:54:58 -0500 |
---|---|---|
committer | Colin Okay <cbeok@protonmail.com> | 2020-04-18 09:54:58 -0500 |
commit | fef34faeaeadb36c0353ee80c70866810d1ce28e (patch) | |
tree | a1abf29c9110ec1ab37b96030fc6a0088fe4d062 | |
parent | 9df0939d0fc02318905d3c67c589aece8481a6b3 (diff) |
added im-the-sender-p
-rw-r--r-- | granolin.lisp | 6 | ||||
-rw-r--r-- | package.lisp | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/granolin.lisp b/granolin.lisp index f1ce5c3..a5a1e66 100644 --- a/granolin.lisp +++ b/granolin.lisp @@ -199,6 +199,12 @@ ;; the basic-json struct is used as a kind of default in some places (def-json-wrap basic-json) + +;;; Event Utility Functions +(defun im-the-sender-p (client event) + (equal (user-id client) + (sender event))) + ;;; URI constants (format) strings for interacting with the Matrix API (defparameter +login-path+ "/_matrix/client/r0/login") diff --git a/package.lisp b/package.lisp index 7d6664c..b3f18b9 100644 --- a/package.lisp +++ b/package.lisp @@ -70,6 +70,9 @@ #:room-state-event #:invitation-event + ;; event utils + #:im-the-sender-p + ;; generic response types #:basic-json |