lib/mipush/android_message.rb in mipush-0.0.2 vs lib/mipush/android_message.rb in mipush-0.0.3

- old
+ new

@@ -22,11 +22,11 @@ def initialize(options={}) @title = options[:title] @description = options[:description] @payload = options[:payload] @pass_through = options[:pass_through] || NTF_CENTER_NTF - @notify_type = options[:notify_type] || NOTIFY_TYPE_DEFAULT_ALL + @notify_type = options[:notify_type] || NOTIFY_TYPE_DEFAULT_SOUND @restricted_package_name = options[:restricted_package_name] @secret_key = options[:secret_key] end # 重构这一端烂代码 @@ -35,11 +35,11 @@ string += "title=#{URI.encode @title.to_s}&" unless @title.nil? string += "description=#{URI.encode @description.to_s}&" unless @description.nil? string += "payload=#{URI.encode @payload.to_s}&" unless @payload.nil? string += "pass_through=#{URI.encode @pass_through.to_s}&" unless @pass_through.nil? string += "notify_type=#{URI.encode @notify_type.to_s}&" unless @notify_type.nil? - string += "restricted_package_name=#{URI.encode @restricted_package_name.to_s}" unless @restricted_package_name.nil? - + string += "restricted_package_name=#{URI.encode @restricted_package_name.to_s}&" unless @restricted_package_name.nil? + string += "extra.notify_effect=1" string end end end