@@ -1507,7 +1507,7 @@ public void getChatRoomInfos(ReadableMap map, final Callback success, final Call
15071507 ReadableArray array = map .getArray (Constant .ROOM_IDS );
15081508 Set <Long > idSet = new HashSet <>();
15091509 for (int i =0 ; i < array .size () -1 ; i ++) {
1510- long id = Double . valueOf (array .getDouble (i )). longValue ( );
1510+ long id = Long . parseLong (array .getString (i ));
15111511 idSet .add (id );
15121512 }
15131513 ChatRoomManager .getChatRoomInfos (idSet , new RequestCallback <List <ChatRoomInfo >>() {
@@ -1529,8 +1529,8 @@ public void gotResult(int status, String desc, List<ChatRoomInfo> list) {
15291529 * @param fail 失败回调
15301530 */
15311531 @ ReactMethod
1532- public void enterChatRoom (long roomId , final Callback success , final Callback fail ) {
1533- ChatRoomManager .enterChatRoom (roomId , new RequestCallback <Conversation >() {
1532+ public void enterChatRoom (String roomId , final Callback success , final Callback fail ) {
1533+ ChatRoomManager .enterChatRoom (Long . parseLong ( roomId ) , new RequestCallback <Conversation >() {
15341534 @ Override
15351535 public void gotResult (int status , String desc , Conversation conversation ) {
15361536 mJMessageUtils .handleCallbackWithObject (status , desc , success , fail , ResultUtils .toJSObject (conversation ));
@@ -1545,8 +1545,8 @@ public void gotResult(int status, String desc, Conversation conversation) {
15451545 * @param fail 失败回调
15461546 */
15471547 @ ReactMethod
1548- public void leaveChatRoom (long roomId , final Callback success , final Callback fail ) {
1549- ChatRoomManager .leaveChatRoom (roomId , new BasicCallback () {
1548+ public void leaveChatRoom (String roomId , final Callback success , final Callback fail ) {
1549+ ChatRoomManager .leaveChatRoom (Long . parseLong ( roomId ) , new BasicCallback () {
15501550 @ Override
15511551 public void gotResult (int i , String s ) {
15521552 mJMessageUtils .handleCallback (i , s , success , fail );
@@ -1569,17 +1569,17 @@ public void getChatRoomConversationList(Callback success) {
15691569 * @param roomId 聊天室 id
15701570 */
15711571 @ ReactMethod
1572- public void deleteChatRoomConversation (long roomId , Callback success ) {
1573- success .invoke (JMessageClient .deleteChatRoomConversation (roomId ));
1572+ public void deleteChatRoomConversation (String roomId , Callback success ) {
1573+ success .invoke (JMessageClient .deleteChatRoomConversation (Long . parseLong ( roomId ) ));
15741574 }
15751575
15761576 /**
15771577 * 创建聊天室会话,如果本地已存在,则不会重新创建,直接返回该会话
15781578 * @param roomId 聊天室 id
15791579 */
15801580 @ ReactMethod
1581- public void createChatRoomConversation (long roomId , Callback success ) {
1582- Conversation conversation = Conversation .createChatRoomConversation (roomId );
1581+ public void createChatRoomConversation (String roomId , Callback success ) {
1582+ Conversation conversation = Conversation .createChatRoomConversation (Long . parseLong ( roomId ) );
15831583 success .invoke (ResultUtils .toJSObject (conversation ));
15841584 }
15851585
0 commit comments