lib/client.rb in navi_client-1.1.7 vs lib/client.rb in navi_client-1.1.8
- old
+ new
@@ -11,14 +11,10 @@
require "httparty"
require "http_service/naviai"
module Client
- def logger
- @logger
- end
-
#
# imap_connection
#
# connect the app with imap server
#
@@ -31,13 +27,15 @@
# http://ruby-doc.org/stdlib-2.1.5/libdoc/net/imap/rdoc/Net/IMAP.html#method-i-capability
capabilities = imap.capability
@logger.debug("imap capabilities: #{capabilities.join(',')}") if @debug
- unless capabilities.include? "IDLE"
- @logger.info "'IDLE' IMAP capability not available in server: #{server}"
- imap.disconnect
- exit
+ if @client_type == 'local'
+ unless capabilities.include? "IDLE"
+ @logger.info "'IDLE' IMAP capability not available in server: #{server}"
+ imap.disconnect
+ exit
+ end
end
# login
imap.login username, password