public void updateMessage ( final AVIMMessage oldMessage , final AVIMMessage newMessage , final AVIMMessageUpdatedCallback callback ) { if ( null == oldMessage || null == newMessage ) { if ( null != callback ) { callback . internalDone ( new AVException ( new IllegalArgumentException ( "oldMessage/newMessage shouldn't be null" ) ) ) ; } return ; } final AVIMCommonJsonCallback tmpCallback = new AVIMCommonJsonCallback ( ) { @ Override public void done ( Map < String , Object > result , AVIMException e ) { if ( null != e || null == result ) { if ( null != callback ) { callback . internalDone ( null , e ) ; } } else { long patchTime = 0 ; if ( result . containsKey ( Conversation . PARAM_MESSAGE_PATCH_TIME ) ) { patchTime = ( Long ) result . get ( Conversation . PARAM_MESSAGE_PATCH_TIME ) ; } copyMessageWithoutContent ( oldMessage , newMessage ) ; newMessage . setUpdateAt ( patchTime ) ; updateLocalMessage ( newMessage ) ; if ( null != callback ) { callback . internalDone ( newMessage , null ) ; } } } } ; InternalConfiguration . getOperationTube ( ) . updateMessage ( client . getClientId ( ) , getType ( ) , oldMessage , newMessage , tmpCallback ) ; }
update message content