diff --git a/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/Scrapper.kt b/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/Scrapper.kt index f728cd8a..abb7360b 100644 --- a/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/Scrapper.kt +++ b/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/Scrapper.kt @@ -177,8 +177,8 @@ class Scrapper { normalizedSymbol, email, password, LoginHelper(loginType, schema, host, normalizedSymbol, serviceManager.getCookieManager(), serviceManager.getLoginService()), serviceManager.getRegisterService(), - serviceManager.getMessagesService(), - serviceManager.getStudentService(withLogin = false, studentInterceptor = false), // it is really needed? + serviceManager.getMessagesService(withLogin = false), + serviceManager.getStudentService(withLogin = false, studentInterceptor = false), serviceManager.urlGenerator ) } diff --git a/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/service/ServiceManager.kt b/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/service/ServiceManager.kt index b9dc8f94..da46225e 100644 --- a/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/service/ServiceManager.kt +++ b/sdk-scrapper/src/main/kotlin/io/github/wulkanowy/sdk/scrapper/service/ServiceManager.kt @@ -130,8 +130,8 @@ class ServiceManager( return client } - fun getMessagesService(): MessagesService { - return getRetrofit(getClientBuilder(), urlGenerator.generate(UrlGenerator.Site.MESSAGES), gson = true).create() + fun getMessagesService(withLogin: Boolean = true): MessagesService { + return getRetrofit(getClientBuilder(loginIntercept = withLogin), urlGenerator.generate(UrlGenerator.Site.MESSAGES), gson = true).create() } fun getHomepageService(): HomepageService {