diff --git a/internal/server/fence.go b/internal/server/fence.go index 6cf11faf..fcba97f9 100644 --- a/internal/server/fence.go +++ b/internal/server/fence.go @@ -99,9 +99,9 @@ func fenceMatch( roamNearbys, roamFaraways = fenceMatchRoam(sw.s, fence, details.id, details.oldObj, details.obj) - } - if len(roamNearbys) == 0 && len(roamFaraways) == 0 { - return nil + if len(roamNearbys) == 0 && len(roamFaraways) == 0 { + return nil + } } detect = "roam" } else { @@ -235,6 +235,12 @@ func fenceMatch( case "roam": if len(msgs) > 0 { var nmsgs []string + for _, msg := range msgs { + cmd := gjson.Get(msg, "command") + if cmd.Exists() && cmd.String() != "set" { + nmsgs = append(nmsgs, msg) + } + } for i := range roamNearbys { nmsg := extendRoamMessage(sw, fence, "nearby", msgs[0], roamNearbys[i])