Closed marc-neumann closed 3 years ago
Hi,
In this old pull request https://github.com/ostinelli/apnotic/pull/19 the apns_collapse_id was added. It would be nice if this id could also be added to the to_hash method in Apnotic::Notification. something like this in line https://github.com/ostinelli/apnotic/blob/master/lib/apnotic/notification.rb#L27
to_hash
def to_hash { aps: aps }.tap do |result| result.merge!(custom_payload) if custom_payload result[:aps].merge!(apns_collapse_id: apns_collapse_id) if apns_collapse_id end end
Hi @TigerTim,
I believe apns-collapse-id is a header and sending it in the body would have no effect or be invalid. It does get correctly set in Request.
apns-collapse-id
Request
Hi,
In this old pull request https://github.com/ostinelli/apnotic/pull/19 the apns_collapse_id was added. It would be nice if this id could also be added to the
to_hash
method in Apnotic::Notification. something like this in line https://github.com/ostinelli/apnotic/blob/master/lib/apnotic/notification.rb#L27