Skip to content

Commit 8568b1e

Browse files
committed
Update InAppMessage lifecycle listeners to send entire event on iOS
1 parent 117722b commit 8568b1e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ios/RCTOneSignal/RCTOneSignal.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,19 +91,19 @@ - (void)onClickInAppMessage:(OSInAppMessageClickEvent * _Nonnull)event {
9191
}
9292

9393
- (void)onWillDisplayInAppMessage:(OSInAppMessageWillDisplayEvent * _Nonnull)event {
94-
[self sendEvent:OSEventString(InAppMessageWillDisplay) withBody:@{@"message": [event.message jsonRepresentation]}];
94+
[self sendEvent:OSEventString(InAppMessageWillDisplay) withBody:[event jsonRepresentation]];
9595
}
9696

9797
- (void)onDidDisplayInAppMessage:(OSInAppMessageDidDisplayEvent * _Nonnull)event {
98-
[self sendEvent:OSEventString(InAppMessageDidDisplay) withBody:@{@"message": [event.message jsonRepresentation]}];
98+
[self sendEvent:OSEventString(InAppMessageDidDisplay) withBody:[event jsonRepresentation]];
9999
}
100100

101101
- (void)onWillDismissInAppMessage:(OSInAppMessageWillDismissEvent * _Nonnull)event {
102-
[self sendEvent:OSEventString(InAppMessageWillDismiss) withBody:@{@"message": [event.message jsonRepresentation]}];
102+
[self sendEvent:OSEventString(InAppMessageWillDismiss) withBody:[event jsonRepresentation]];
103103
}
104104

105105
- (void)onDidDismissInAppMessage:(OSInAppMessageDidDismissEvent * _Nonnull)event {
106-
[self sendEvent:OSEventString(InAppMessageDidDismiss) withBody:@{@"message": [event.message jsonRepresentation]}];
106+
[self sendEvent:OSEventString(InAppMessageDidDismiss) withBody:[event jsonRepresentation]];
107107
}
108108

109109
- (void)dealloc {

0 commit comments

Comments
 (0)