Skip to content

Commit e14efeb

Browse files
committed
Fixed callbacks for Unity's postNotification
* Fixed wrong callbacks firing for success and failures for Unity's proxy postNotification
1 parent cd82dbb commit e14efeb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

OneSignalSDK/onesignal/src/unity/java/com/onesignal/OneSignalUnityProxy.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,11 @@ public void onSuccess(JSONObject response) {
199199
params.put("delegate_id", new JSONObject().put("success", delegateIdSuccess).put("failure", delegateIdFailure).toString());
200200
if (response == null) {
201201
params.put("response", "");
202-
OneSignalUnityProxy.unitySafeInvoke("onSendOutcomeSuccess", params.toString());
202+
OneSignalUnityProxy.unitySafeInvoke("onPostNotificationSuccess", params.toString());
203203
return;
204204
}
205205
params.put("response", response.toString());
206-
OneSignalUnityProxy.unitySafeInvoke("onSendOutcomeSuccess", params.toString());
206+
OneSignalUnityProxy.unitySafeInvoke("onPostNotificationSuccess", params.toString());
207207
} catch (JSONException e) {
208208
e.printStackTrace();
209209
}
@@ -215,11 +215,11 @@ public void onFailure(JSONObject response) {
215215
params.put("delegate_id", new JSONObject().put("success", delegateIdSuccess).put("failure", delegateIdFailure));
216216
if (response == null) {
217217
params.put("response", "");
218-
OneSignalUnityProxy.unitySafeInvoke("onSendOutcomeSuccess", params.toString());
218+
OneSignalUnityProxy.unitySafeInvoke("onPostNotificationFailed", params.toString());
219219
return;
220220
}
221221
params.put("response", response.toString());
222-
OneSignalUnityProxy.unitySafeInvoke("onSendOutcomeSuccess", params.toString());
222+
OneSignalUnityProxy.unitySafeInvoke("onPostNotificationFailed", params.toString());
223223
} catch (JSONException e) {
224224
e.printStackTrace();
225225
}

0 commit comments

Comments
 (0)