diff options
author | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2012-04-26 13:48:43 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <code@mail.matthias.benkard.de> | 2012-04-26 13:48:43 +0200 |
commit | 326a0e8afd98e3b4c686c37dab8db27e3e6deb9b (patch) | |
tree | fed842a289eb979d210c2fc5958177ec6e6327de /src | |
parent | 1310d90f5fc08e69e721dd611f5d62a9154cc76a (diff) |
XMPP: Ignore OTR messages.
Diffstat (limited to 'src')
-rw-r--r-- | src/mulk/benki/xmpp.clj | 6 |
1 files 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 |