From 41214797d6808778a47d720198514c6326601610 Mon Sep 17 00:00:00 2001
From: lazorfuzz <leontosy@gmail.com>
Date: Tue, 5 Jun 2018 00:37:35 -0700
Subject: [PATCH] Logic fix

---
 README.md        | 6 +++---
 src/liowebrtc.js | 8 +-------
 test/index.html  | 3 +--
 3 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/README.md b/README.md
index 076135a..5dd6fc5 100644
--- a/README.md
+++ b/README.md
@@ -26,12 +26,12 @@ By default, this enables video, audio, and data channels.
 const webrtc = new LioWebRTC({
     // The local video ref set within your render function, or the element's id
     localVideoEl: localVideoIdOrRef,
-    // Immediately request camera and mic access.
+    // Immediately request camera and mic access
     autoRequestMedia: true,
-    // Displays events emitted by the webrtc object in the console.
+    // Displays events emitted by the webrtc object in the console
     debug: true,
     // The url for your signaling server
-    url: 'https://sandbox.simplewebrtc.com:443/',
+    url: 'https://sandbox.simplewebrtc.com:443/'
 });
 ```
 
diff --git a/src/liowebrtc.js b/src/liowebrtc.js
index 10c53e9..56107a9 100644
--- a/src/liowebrtc.js
+++ b/src/liowebrtc.js
@@ -102,13 +102,7 @@ class LioWebRTC extends WildEmitter {
         peer.handleMessage(message);
       } else if (peers.length) {
         peers.forEach((p) => {
-          if (message.sid) {
-            if (p.sid === message.sid) {
-              p.handleMessage(message);
-            }
-          } else {
-            p.handleMessage(message);
-          }
+          p.handleMessage(message);
         });
       }
     });
diff --git a/test/index.html b/test/index.html
index d64f423..0b81e03 100644
--- a/test/index.html
+++ b/test/index.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
     <head>
-        <title>SimpleWebRTC Demo</title>
+        <title>LioWebRTC Demo</title>
     </head>
     <body>
         <h1 id="title">Start a room</h1>
@@ -37,7 +37,6 @@
         </div>
         <div id="remotes"></div>
         <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
-        <script src="../out/simplewebrtc-with-adapter.bundle.js"></script>
         <script>
             // grab the room from the URL
             var room = location.search && location.search.split('?')[1];
-- 
GitLab