[WRTjs][Service] Return the callbackid for addMessagePortListener 42/320142/1
authorChunling Ye <chunling.ye@samsung.com>
Mon, 24 Feb 2025 09:37:29 +0000 (17:37 +0800)
committerChunling Ye <chunling.ye@samsung.com>
Mon, 24 Feb 2025 09:41:57 +0000 (17:41 +0800)
Fix port not found issue when service app do messageport
removeMessagePortListener.

Change-Id: Ib9169c705f8564df3d9fb2b1c6923c6b24c5fb00
Signed-off-by: Chunling Ye <chunling.ye@samsung.com>
wrt_app/service/message_port_router.ts

index bf5927cc1d207cef5166d7ebf5513cc3aaa7f749..a9c939b07a5346df98c77e5f21c2907cd14b387b 100644 (file)
@@ -72,7 +72,7 @@ export class LocalMessagePort {
         remoteMessagePort = LocalMessagePort.funcRemoteMessagePort(remoteAppId, remotePort);
       return listener(message, remoteMessagePort);
     }
-    this.messagePortObj.addMessagePortListener(listenerWrapper);
+    return this.messagePortObj.addMessagePortListener(listenerWrapper);
   }
 
   removeMessagePortListener(watchId: any) {