Commit 7f86898d authored by Leonardo Aramaki's avatar Leonardo Aramaki

Fix broken sdk api calls

parent be865436
......@@ -26,11 +26,11 @@ class ChatRoomsAdapter(private var dataSet: MutableList<ChatRoom>, private val c
val chatRoom = dataSet[position]
val chatRoomName = chatRoom.name
holder.chatName.textContent = chatRoomName!!
holder.chatName.textContent = chatRoomName
if (chatRoom.type == RoomType.ONE_TO_ONE) {
// TODO Check the best way to get the current server url.
val canonicalUrl = chatRoom.client.restUrl.toString()
val canonicalUrl = chatRoom.client.url
holder.userAvatar.setImageURI(UrlHelper.getAvatarUrl(canonicalUrl, chatRoomName))
holder.userAvatar.setVisibility(true)
} else {
......
......@@ -29,8 +29,8 @@ class AppModule {
platformLogger = logger
// TODO remove
restUrl = HttpUrl.parse("https://open.rocket.chat")!!
websocketUrl = "https://open.rocket.chat"
// TODO: From where should we get the url here?
restUrl = "https://unstable.rocket.chat"
}
}
......
......@@ -11,7 +11,6 @@ import chat.rocket.core.RocketChatClient
import chat.rocket.core.TokenRepository
import dagger.Module
import dagger.Provides
import okhttp3.HttpUrl
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import javax.inject.Singleton
......@@ -57,8 +56,7 @@ class PushModule(val context: FirebaseTokenService) {
fun provideRocketChatClient(okHttpClient: OkHttpClient, repository: TokenRepository, logger: PlatformLogger): RocketChatClient {
return RocketChatClient.create {
httpClient = okHttpClient
restUrl = HttpUrl.parse("https://unstable.rocket.chat")!!
websocketUrl = "https://unstable.rocket.chat"
restUrl = "https://unstable.rocket.chat"
tokenRepository = repository
platformLogger = logger
}
......
......@@ -9,7 +9,7 @@ ext {
kotlin : '1.2.10',
coroutine : '0.21',
dokka : '0.9.15',
kotshi : '0.3.0-beta2',
kotshi : '0.3.0',
// Main dependencies
support : '27.0.2',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment