Kaynağa Gözat

send dc message

herlanS_ 3 yıl önce
ebeveyn
işleme
c3e45ee515

+ 5 - 1
src/main/kotlin/co/id/datacomsolusindo/ipphonebridge/SocketChecker.kt

@@ -13,7 +13,11 @@ class SocketChecker {
     @SendTo("/topic/healthCheck")
     @Throws(Exception::class)
     fun greeting(message: MutableMap<*, *>): MutableMap<*, *> {
-        return mutableMapOf(Pair("Hi", "I'am Ok"))
+        return if (!ClientHolder.get().containsKey(message["Hi"])) {
+            mutableMapOf(Pair("Hi", "I'am Ok"), Pair("dc", message["Hi"]))
+        } else {
+            mutableMapOf(Pair("Hi", "I'am Ok"))
+        }
     }
 
     fun collectChunk(message: SocketChunkData, id: String){