From df6cfe98991c34c10763c5b809769cf4749067b8 Mon Sep 17 00:00:00 2001 From: Farhan Khan Date: Tue, 1 Feb 2022 20:21:51 +0000 Subject: [PATCH] Added message parsing check --- fedilogue/stream.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fedilogue/stream.go b/fedilogue/stream.go index d44fc3d..7dd5bb6 100644 --- a/fedilogue/stream.go +++ b/fedilogue/stream.go @@ -87,6 +87,9 @@ func StreamMastodon(endpoint string, o *shared.RunningInstance) { case "data": switch name { case "update": + if len(token) >= 2 && len(token[1]) >= 2 { + continue + } jsondata := token[1][1:] err := json.Unmarshal([]byte(jsondata), &newactivity) if err != nil {