Skip to content

Commit ffe20d0

Browse files
committed
fix event message field
1 parent 3286eb2 commit ffe20d0

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

example/app/routes/Chat/index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ export default class Chat extends Component {
9090
auroraMsg.msgType = "video"
9191
}
9292

93+
if (jmessage.type === 'event') {
94+
// auroraMsg.mediaPath = jmessage.path
95+
// auroraMsg.duration = jmessage.duration
96+
Alert.alert('event' , jmessage.eventType)
97+
auroraMsg.text = jmessage.eventType
98+
}
99+
93100
var user = {
94101
userId: "1",
95102
displayName: "",

ios/RCTJMessageModule/JMessageHelper.m

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -401,63 +401,63 @@ - (NSMutableDictionary *)messageToDictionary {
401401

402402
switch (eventContent.eventType) {
403403
case kJMSGEventNotificationAcceptedFriendInvitation: {
404-
dict[@"evenType"] = @"acceptedFriendInvitation";
404+
dict[@"eventType"] = @"acceptedFriendInvitation";
405405
break;
406406
}
407407
case kJMSGEventNotificationAddGroupMembers: {
408-
dict[@"evenType"] = @"group_member_added";
408+
dict[@"eventType"] = @"group_member_added";
409409
break;
410410
}
411411
case kJMSGEventNotificationCreateGroup: {
412-
dict[@"evenType"] = @"createGroup";
412+
dict[@"eventType"] = @"createGroup";
413413
break;
414414
}
415415
case kJMSGEventNotificationCurrentUserInfoChange: {
416-
dict[@"evenType"] = @"currentUserInfoChange";
416+
dict[@"eventType"] = @"currentUserInfoChange";
417417
break;
418418
}
419419
case kJMSGEventNotificationDeclinedFriendInvitation: {
420-
dict[@"evenType"] = @"declinedFriendInvitation";
420+
dict[@"eventType"] = @"declinedFriendInvitation";
421421
break;
422422
}
423423
case kJMSGEventNotificationDeletedFriend: {
424-
dict[@"evenType"] = @"deletedFriend";
424+
dict[@"eventType"] = @"deletedFriend";
425425
break;
426426
}
427427
case kJMSGEventNotificationExitGroup: {
428-
dict[@"evenType"] = @"group_member_exit";
428+
dict[@"eventType"] = @"group_member_exit";
429429
break;
430430
}
431431
case kJMSGEventNotificationLoginKicked: {
432-
dict[@"evenType"] = @"loginKicked";
432+
dict[@"eventType"] = @"loginKicked";
433433
break;
434434
}
435435
case kJMSGEventNotificationMessageRetract: {
436-
dict[@"evenType"] = @"messageRetract";
436+
dict[@"eventType"] = @"messageRetract";
437437
break;
438438
}
439439
case kJMSGEventNotificationReceiveFriendInvitation: {
440-
dict[@"evenType"] = @"receiveFriendInvitation";
440+
dict[@"eventType"] = @"receiveFriendInvitation";
441441
break;
442442
}
443443
case kJMSGEventNotificationReceiveServerFriendUpdate: {
444-
dict[@"evenType"] = @"receiveServerFriendUpdate";
444+
dict[@"eventType"] = @"receiveServerFriendUpdate";
445445
break;
446446
}
447447
case kJMSGEventNotificationRemoveGroupMembers: {
448-
dict[@"evenType"] = @"group_member_removed";
448+
dict[@"eventType"] = @"group_member_removed";
449449
break;
450450
}
451451
case kJMSGEventNotificationServerAlterPassword: {
452-
dict[@"evenType"] = @"serverAlterPassword";
452+
dict[@"eventType"] = @"serverAlterPassword";
453453
break;
454454
}
455455
case kJMSGEventNotificationUpdateGroupInfo: {
456-
dict[@"evenType"] = @"updateGroupInfo";
456+
dict[@"eventType"] = @"updateGroupInfo";
457457
break;
458458
}
459459
case kJMSGEventNotificationUserLoginStatusUnexpected: {
460-
dict[@"evenType"] = @"userLoginStatusUnexpected";
460+
dict[@"eventType"] = @"userLoginStatusUnexpected";
461461
break;
462462
}
463463
default:

0 commit comments

Comments
 (0)