From d26d4a972c5d03f221b1a129a17b9b8f2d87780d Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sun, 22 Sep 2019 20:29:10 -0400 Subject: [PATCH] technically, should undo read instead of sending ignore. not using ignore activity yet --- activity.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/activity.go b/activity.go index 70bcf89..cbe453e 100644 --- a/activity.go +++ b/activity.go @@ -804,6 +804,7 @@ func subsub(user *WhatAbout, xid string) { deliverate(0, user.Name, xid, msg) } +// returns activity, object func jonkjonk(user *WhatAbout, h *Honk) (junk.Junk, junk.Junk) { dt := h.Date.Format(time.RFC3339) var jo junk.Junk @@ -932,6 +933,7 @@ func jonkjonk(user *WhatAbout, h *Honk) (junk.Junk, junk.Junk) { b := junk.New() b["id"] = user.URL + "/" + "bonk" + "/" + shortxid(h.XID) b["type"] = "Announce" + b["actor"] = user.URL if h.Convoy != "" { b["context"] = h.Convoy } @@ -945,8 +947,13 @@ func jonkjonk(user *WhatAbout, h *Honk) (junk.Junk, junk.Junk) { j["type"] = "Read" j["object"] = h.XID case "deack": - j["type"] = "Ignore" - j["object"] = h.XID + b := junk.New() + b["id"] = user.URL + "/" + "ack" + "/" + shortxid(h.XID) + b["type"] = "Read" + b["actor"] = user.URL + b["object"] = h.XID + j["type"] = "Undo" + j["object"] = b } return j, jo