From 972f5d6688b170eb3cd0ae9c4cc23455d484a8b5 Mon Sep 17 00:00:00 2001 From: Pankaj Soni Date: Thu, 21 Jul 2016 19:57:02 +0530 Subject: [PATCH] fix --- src/fcm.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fcm.erl b/src/fcm.erl index 71d5c02..5e3e30d 100644 --- a/src/fcm.erl +++ b/src/fcm.erl @@ -79,6 +79,8 @@ do_push(RegIds, Message, Key, Retry) -> {error, Reason} end. +handle_result(GCMResult, RegId) when is_binary(RegId) -> + handle_result(GCMResult, [RegId]); handle_result(GCMResult, RegIds) -> {_MulticastId, _SuccessesNumber, _FailuresNumber, _CanonicalIdsNumber, Results} = GCMResult, lists:map(fun({Result, RegId}) -> {RegId, parse(Result)} end, lists:zip(Results, RegIds)).