/** * Get the session's current user. The MyUser object provides methods for updating user properties which are not possible for other users. * * @return the session's MyUser object */ public MyUser getMyUser() { checkIfAlive(); return mDataHandler.getMyUser(); }
/** * Store and upload the provided direct chat rooms map. * * @param directChatRoomsMap the direct chats map * @param callback the asynchronous callback */ public void setDirectChatRoomsMap(Map<String, List<String>> directChatRoomsMap, ApiCallback<Void> callback) { Log.d(LOG_TAG, "## setDirectChatRoomsMap()"); IMXStore store = getStore(); if (null != store) { // update the store value // do not wait the server request echo to update the store store.setDirectChatRoomsDict(directChatRoomsMap); } else { Log.e(LOG_TAG, "## setDirectChatRoomsMap() : null store"); } mLocalDirectChatRoomIdsList = null; // Upload the new map mAccountDataRestClient.setAccountData(getMyUser().user_id, AccountDataElement.ACCOUNT_DATA_TYPE_DIRECT_MESSAGES, directChatRoomsMap, callback); }
final MXDataHandler dataHandler = room.getDataHandler(); final String roomId = room.getRoomId(); final String myUserId = dataHandler.getMyUser().user_id; final RoomMember selfMember = mTimelineStateHolder.getState().getMember(myUserId); final RoomSummary currentSummary = store.getSummary(roomId);
final MXDataHandler dataHandler = room.getDataHandler(); final String timelineId = mEventTimeline.getTimelineId(); final MyUser myUser = dataHandler.getMyUser();