yuki24 / pushing

Finally, push notification framework that does not hurt. currently supports Android (FCM) and iOS (APNs)
MIT License
46 stars 6 forks source link

Why disabled relative path? #22

Open chatii opened 5 years ago

chatii commented 5 years ago

https://github.com/yuki24/pushing/blob/3fecf175b8f3a5aad6bc93698acd2e6d1cc47a5f/lib/pushing/base.rb#L105-L108

For Web Push, for example, an icon can specify a path like "/assets/icon.png" and it works. Unlike mail (ActionMailer), relative path is accepted, so I think it should be enabled.

yuki24 commented 5 years ago

Oh interesting, I was not aware of the fact that relative paths could be sent. I'll have to familiarize myself with Web Push though (I've only used APN and FCM), but I'd be happy to add better support for Web Push as well.

For now you could jut override the #supports_path? method to work around it:

class ApplicationNotifier < Pushing::Base
  def self. supports_path?
    true
  end
end
chatii commented 5 years ago

@yuki24 Thanks for you reply! I try override #supports_path? method, and I expect to your code 👍