all repos — honk @ ad3a87d2c4315da586d12ac646b28b41be75a37c

my fork of honk

prefer the activitypub context name for conversation
Ted Unangst tedu@tedunangst.com
Fri, 19 Apr 2019 12:48:44 -0400
commit

ad3a87d2c4315da586d12ac646b28b41be75a37c

parent

4383bba0663db4b587d2af9f4f49d1c742bf94bb

1 files changed, 9 insertions(+), 2 deletions(-)

jump to
M activity.goactivity.go

@@ -360,7 +360,10 @@ if err != nil {

log.Printf("error getting remote xonk: %s", err) return nil, "" } - convoy, _ := jsongetstring(obj, "conversation") + convoy, _ := jsongetstring(obj, "context") + if convoy == "" { + convoy, _ = jsongetstring(obj, "conversation") + } return newphone(nil, obj), convoy }

@@ -425,7 +428,10 @@ if summary != "" {

content = "<p>summary: " + summary + content } rid, _ = jsongetstring(obj, "inReplyTo") - convoy, _ = jsongetstring(obj, "conversation") + convoy, _ = jsongetstring(obj, "context") + if convoy == "" { + convoy, _ = jsongetstring(obj, "conversation") + } if what == "honk" && rid != "" { what = "tonk" }

@@ -571,6 +577,7 @@ if h.RID != "" {

jo["inReplyTo"] = h.RID } if h.Convoy != "" { + jo["context"] = h.Convoy jo["conversation"] = h.Convoy } jo["to"] = h.Audience[0]