Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with tracking multiple push notifications in same publish #18

Open
vsai opened this issue Oct 26, 2018 · 3 comments
Open

Issue with tracking multiple push notifications in same publish #18

vsai opened this issue Oct 26, 2018 · 3 comments

Comments

@vsai
Copy link

vsai commented Oct 26, 2018

We are recommended to pass in an array of messages to expo server, to reduce the number of requests being made.

However, when I make a request where there is an array, the response object only displays one element.

I think this has to do with:

      def extract_data(response)
        response.fetch('data').first
      end

Is there a reason for this? Why not simply return response.fetch('data')

Even better, it may be a good idea to do:

      def extract_data(response)
        data = response.fetch('data')
        (data.class == Hash) ? [data] : data
      end

So we can always expect an array response.

I'm not sure if I'm missing something, which is why I'm posting here.

@vsai
Copy link
Author

vsai commented Oct 26, 2018

It looks like it may also apply to the error messages.

It only seems to look at the first response, rather than simply return the array of responses.

@coffenbacher
Copy link

We also noticed this; I think it's an issue.

@coffenbacher
Copy link

also seems like duplicate of #13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants