diff --git a/CHANGELOG.md b/CHANGELOG.md index cea4214..3333e53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ of [keepachangelog.com](http://keepachangelog.com/). ## [Unreleased] +## [4.9.4] - 2021-12-28 + +### Fixed + +- Fix Interceptor importing problem. Not finding the class. + ## [4.9.3] - 2021-12-28 ### Added @@ -113,6 +119,8 @@ of [keepachangelog.com](http://keepachangelog.com/). [Unreleased]: https://github.com/macielti/common-clj/compare/0.1.1...HEAD +[4.9.4]: https://github.com/macielti/common-clj/compare/4.9.4...4.9.3 + [4.9.3]: https://github.com/macielti/common-clj/compare/4.9.3...3.9.3 [3.9.3]: https://github.com/macielti/common-clj/compare/3.9.3...3.8.3 diff --git a/project.clj b/project.clj index 4f77365..6da7f20 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject net.clojars.macielti/common-clj "4.9.3" +(defproject net.clojars.macielti/common-clj "4.9.4" :description "Just common Clojure code that I use across projects" :url "https://github.com/macielti/common-clj" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" diff --git a/src/common_clj/component/telegram/core.clj b/src/common_clj/component/telegram/core.clj index 142ab8f..715c593 100644 --- a/src/common_clj/component/telegram/core.clj +++ b/src/common_clj/component/telegram/core.clj @@ -1,5 +1,4 @@ (ns common-clj.component.telegram.core - (:use [clojure pprint]) (:require [schema.core :as s] [io.pedestal.interceptor :as interceptor] [com.stuartsierra.component :as component] @@ -9,9 +8,7 @@ [medley.core :as medley] [overtone.at-at :as at-at] [common-clj.component.telegram.adapters.update :as telegram.adapters.message] - [common-clj.component.telegram.models.consumer :as component.telegram.models.consumer] - [taoensso.timbre :as timbre]) - (:import (io.pedestal.interceptor Interceptor))) + [common-clj.component.telegram.models.consumer :as component.telegram.models.consumer])) (s/defn send-message! [message :- s/Str @@ -23,7 +20,7 @@ telegram] (telegram-bot/get-updates telegram {:offset (+ offset 1)})) -(s/defn interceptors-by-consumer :- [Interceptor] +(s/defn interceptors-by-consumer [consumer {:keys [interceptors]}] (let [interceptor-groups (group-by :name interceptors)] diff --git a/src/common_clj/component/telegram/models/consumer.clj b/src/common_clj/component/telegram/models/consumer.clj index 86fc76c..7f93b03 100644 --- a/src/common_clj/component/telegram/models/consumer.clj +++ b/src/common_clj/component/telegram/models/consumer.clj @@ -1,7 +1,6 @@ (ns common-clj.component.telegram.models.consumer (:require [schema.core :as s]) - (:import (clojure.lang IFn) - (io.pedestal.interceptor Interceptor))) + (:import (clojure.lang IFn))) (s/defschema Consumer {(s/optional-key :consumer/interceptors) [s/Keyword] @@ -9,6 +8,6 @@ (s/optional-key :consumer/error-handler) IFn}) (s/defschema Consumers - {(s/optional-key :interceptors) [Interceptor] + {(s/optional-key :interceptors) [s/Any] :message {s/Keyword Consumer} :callback-query {s/Keyword Consumer}})