MxSession have empty rooms
london-tokyo opened this issue · 0 comments
london-tokyo commented
Hi all!
I can't get rooms\groups.
This is how i create session
HomeServerConnectionConfig hsConfig = new HomeServerConnectionConfig.Builder()
.withHomeServerUri(Uri.parse(BuildConfig.SERVER_URL))
.build();
Credentials credentials = new Credentials();
WellKnown known = new WellKnown();
WellKnownBaseConfig homeServer = new WellKnownBaseConfig();
homeServer.baseURL = authCredentials.getHomeServer();
known.homeServer = homeServer;
credentials.accessToken = authCredentials.getAccessToken();
credentials.deviceId = authCredentials.getDeviceId();
credentials.userId = authCredentials.getUserId();
credentials.homeServer = authCredentials.getHomeServer();
credentials.wellKnown = known;
hsConfig.setCredentials(credentials);
IMXStore store = new MXMemoryStore(credentials, context);
MXDataHandler dataHandler = new MXDataHandler(store, credentials);
hsConfig.setHomeserverUri(Uri.parse(BuildConfig.SERVER_URL));
mMXSession = new MXSession.Builder(hsConfig, dataHandler, context).build();
mCredentials = authCredentials;
mMXSession.startEventStream(authCredentials.getAccessToken());
if (!mMXSession.getDataHandler().isInitialSyncComplete()) {
mMXSession.getDataHandler().getStore().open();
And than i tried get rooms like:
Collection summaries = store.getSummaries(); or
Collection list = session.getDataHandler().getStore().getRooms();
Maybe someone has the same issue?