Skip to content

Commit 59b9d0c

Browse files
committed
fix event description empty bug
1 parent d7089c8 commit 59b9d0c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ios/RCTJMessageModule/JMessageHelper.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ - (void)onReceiveFriendNotificationEvent:(JMSGFriendNotificationEvent *)event {
200200
[[NSNotificationCenter defaultCenter] postNotificationName:kJJMessageContactNotify
201201
object:@{
202202
@"type":@"invite_received",
203-
@"reason":[friendEvent eventDescription],
203+
@"reason":[friendEvent eventDescription] ?: @"",
204204
@"fromUsername":[friendEvent getFromUser].username,
205205
@"fromUserAppKey":user.appKey}];
206206
}
@@ -211,7 +211,7 @@ - (void)onReceiveFriendNotificationEvent:(JMSGFriendNotificationEvent *)event {
211211
[[NSNotificationCenter defaultCenter] postNotificationName:kJJMessageContactNotify
212212
object:@{
213213
@"type":@"invite_accepted",
214-
@"reason":[friendEvent eventDescription],
214+
@"reason":[friendEvent eventDescription] ?: @"",
215215
@"fromUsername":[friendEvent getFromUser].username,
216216
@"fromUserAppKey":user.appKey}];
217217
}
@@ -222,7 +222,7 @@ - (void)onReceiveFriendNotificationEvent:(JMSGFriendNotificationEvent *)event {
222222
[[NSNotificationCenter defaultCenter] postNotificationName:kJJMessageContactNotify
223223
object:@{
224224
@"type":@"invite_declined",
225-
@"reason":[friendEvent eventDescription],
225+
@"reason":[friendEvent eventDescription] ?: @"",
226226
@"fromUsername":[friendEvent getFromUser].username,
227227
@"fromUserAppKey":user.appKey}];
228228
}
@@ -233,7 +233,7 @@ - (void)onReceiveFriendNotificationEvent:(JMSGFriendNotificationEvent *)event {
233233
[[NSNotificationCenter defaultCenter] postNotificationName:kJJMessageContactNotify
234234
object:@{
235235
@"type":@"contact_deleted",
236-
@"reason":[friendEvent eventDescription],
236+
@"reason":[friendEvent eventDescription] ?: @"",
237237
@"fromUsername":[friendEvent getFromUser].username,
238238
@"fromUserAppKey":user.appKey}];
239239
}

0 commit comments

Comments
 (0)