include context in read activities

This commit is contained in:
Ted Unangst 2019-10-29 19:50:45 -04:00
parent 35629a0920
commit 693c7fe6e2
1 changed files with 6 additions and 0 deletions

View File

@ -1123,12 +1123,18 @@ func jonkjonk(user *WhatAbout, h *Honk) (junk.Junk, junk.Junk) {
case "ack": case "ack":
j["type"] = "Read" j["type"] = "Read"
j["object"] = h.XID j["object"] = h.XID
if h.Convoy != "" {
j["context"] = h.Convoy
}
case "deack": case "deack":
b := junk.New() b := junk.New()
b["id"] = user.URL + "/" + "ack" + "/" + shortxid(h.XID) b["id"] = user.URL + "/" + "ack" + "/" + shortxid(h.XID)
b["type"] = "Read" b["type"] = "Read"
b["actor"] = user.URL b["actor"] = user.URL
b["object"] = h.XID b["object"] = h.XID
if h.Convoy != "" {
b["context"] = h.Convoy
}
j["type"] = "Undo" j["type"] = "Undo"
j["object"] = b j["object"] = b
} }