From 326a0e8afd98e3b4c686c37dab8db27e3e6deb9b Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Thu, 26 Apr 2012 13:48:43 +0200 Subject: XMPP: Ignore OTR messages. --- src/mulk/benki/xmpp.clj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mulk/benki/xmpp.clj b/src/mulk/benki/xmpp.clj index 5543402..c23f613 100644 --- a/src/mulk/benki/xmpp.clj +++ b/src/mulk/benki/xmpp.clj @@ -66,7 +66,8 @@ (reify MessageListener (processMessage [self chat message] (when-let [body (.getBody message)] - (enqueue messages-in {:sender recipient, :body body})))))] + (when-not (re-find #"^\?OTR:" body) + (enqueue messages-in {:sender recipient, :body body}))))))] (.sendMessage chat notification)))))) (defn- startup-client [] @@ -85,7 +86,8 @@ (reify MessageListener (processMessage [self chat message] (when-let [body (.getBody message)] - (enqueue messages-in {:sender (.getParticipant chat) :body body}))))))))))) + (when-not (re-find #"^\?OTR:" body) + (enqueue messages-in {:sender (.getParticipant chat) :body body})))))))))))) (defn init-xmpp! [] (future -- cgit v1.2.3