diff --git a/build.gradle b/build.gradle index 02520287b..65924a06a 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ allprojects { - version = "0.0.5-beta" + version = "0.0.6-beta" repositories { jcenter() @@ -25,7 +25,7 @@ subprojects { } buildscript { - ext.kotlin_version = '1.0.1' + ext.kotlin_version = '1.0.1-2' repositories { mavenCentral() } diff --git a/mtproto/src/main/kotlin/com/github/badoualy/telegram/mtproto/util/TLUtils.kt b/mtproto/src/main/kotlin/com/github/badoualy/telegram/mtproto/util/TLUtils.kt index 497ee6826..ddff58a13 100644 --- a/mtproto/src/main/kotlin/com/github/badoualy/telegram/mtproto/util/TLUtils.kt +++ b/mtproto/src/main/kotlin/com/github/badoualy/telegram/mtproto/util/TLUtils.kt @@ -10,9 +10,9 @@ fun TLAbsMessage.getDate(): Int = when (this) { } fun TLAbsMessage.getFromId(): Int = when (this) { - is TLMessage -> fromId - is TLMessageService -> fromId - else -> 0 + is TLMessage -> fromId ?: -1 + is TLMessageService -> fromId ?: -1 + else -> -1 } fun TLAbsMessage.isUnread(): Boolean = when (this) {