From fef34faeaeadb36c0353ee80c70866810d1ce28e Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Sat, 18 Apr 2020 09:54:58 -0500 Subject: added im-the-sender-p --- granolin.lisp | 6 ++++++ package.lisp | 3 +++ 2 files changed, 9 insertions(+) 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 -- cgit v1.2.3