diff options
Diffstat (limited to 'juick-www/src/main/java')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/Main.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Main.java b/juick-www/src/main/java/com/juick/www/Main.java index 00ce6bb2..35617295 100644 --- a/juick-www/src/main/java/com/juick/www/Main.java +++ b/juick-www/src/main/java/com/juick/www/Main.java @@ -25,6 +25,7 @@ import com.mitchellbosecke.pebble.error.PebbleException; import net.jodah.failsafe.Execution; import net.jodah.failsafe.RetryPolicy; import org.apache.commons.dbcp2.BasicDataSource; +import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.math.NumberUtils; import org.springframework.jdbc.core.JdbcTemplate; import org.xmlpull.v1.XmlPullParserException; @@ -91,9 +92,11 @@ public class Main extends HttpServlet implements Stream.StreamListener { dataSourceSearch.setUrl(sqlSearchConnStr); sql = new JdbcTemplate(dataSource); sqlSearch = new JdbcTemplate(dataSourceSearch); - - setupXmppComponent(new JID(conf.getProperty("www_xmpp_jid", "www.juick.local")), - conf.getProperty("xmpp_password"), NumberUtils.toInt(conf.getProperty("xmpp_port", ""), 5347)); + boolean isXmppDisabled = BooleanUtils.toBoolean(conf.getProperty("xmpp_disabled")); + if (!isXmppDisabled) { + setupXmppComponent(new JID(conf.getProperty("www_xmpp_jid", "www.juick.local")), + conf.getProperty("xmpp_password"), NumberUtils.toInt(conf.getProperty("xmpp_port", ""), 5347)); + } twitterAuth = new TwitterAuth(conf.getProperty("twitter_consumer_key"), conf.getProperty("twitter_consumer_secret")); loginFacebook = new FacebookLogin(conf.getProperty("facebook_appid"), conf.getProperty("facebook_secret")); |