From 9266cf7124e1cb5c936dcb443e4670d0c91443b0 Mon Sep 17 00:00:00 2001 From: mwfarb Date: Thu, 2 Mar 2023 12:49:58 -0500 Subject: [PATCH] fix(mqtt): always process locally generated messages --- Runtime/ArenaClientScene.cs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Runtime/ArenaClientScene.cs b/Runtime/ArenaClientScene.cs index 06caf29..dc0fe4a 100644 --- a/Runtime/ArenaClientScene.cs +++ b/Runtime/ArenaClientScene.cs @@ -924,7 +924,6 @@ private void PublishSceneMessage(string topic, string msg, bool hasPermissions) byte[] payload = System.Text.Encoding.UTF8.GetBytes(msg); Publish(topic, payload); // remote LogMessage("Sending", JsonConvert.DeserializeObject(msg), hasPermissions); - ProcessMessage(payload); // local } private static string GetTimestamp() @@ -949,12 +948,7 @@ protected override void DecodeMessage(string topic, byte[] message) { // Call the delegate if a user has defined it if (OnMessageCallback != null) OnMessageCallback(topic, message); - - // ignore this client's messages - if (!topic.Contains(client.ClientId)) - { - ProcessMessage(message); - } + ProcessMessage(message); } internal void ProcessMessage(string message, object menuCommand = null)