Added message parsing check
This commit is contained in:
parent
6eaba2a3d5
commit
df6cfe9899
@ -87,6 +87,9 @@ func StreamMastodon(endpoint string, o *shared.RunningInstance) {
|
|||||||
case "data":
|
case "data":
|
||||||
switch name {
|
switch name {
|
||||||
case "update":
|
case "update":
|
||||||
|
if len(token) >= 2 && len(token[1]) >= 2 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
jsondata := token[1][1:]
|
jsondata := token[1][1:]
|
||||||
err := json.Unmarshal([]byte(jsondata), &newactivity)
|
err := json.Unmarshal([]byte(jsondata), &newactivity)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user