we need some more debugging for the friendibonks
This commit is contained in:
parent
86f05b7166
commit
2ae79a2cc1
11
activity.go
11
activity.go
|
@ -560,9 +560,11 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk {
|
||||||
if obj != nil {
|
if obj != nil {
|
||||||
_, ok := obj.GetString("diaspora:guid")
|
_, ok := obj.GetString("diaspora:guid")
|
||||||
if ok {
|
if ok {
|
||||||
// frienda does the silliest bonks
|
log.Printf("looks like friendica")
|
||||||
|
// friendica does the silliest bonks
|
||||||
c, ok := item.FindString([]string{"source", "content"})
|
c, ok := item.FindString([]string{"source", "content"})
|
||||||
if ok {
|
if ok {
|
||||||
|
log.Printf("got content")
|
||||||
re_link := regexp.MustCompile(`link='([^']*)'`)
|
re_link := regexp.MustCompile(`link='([^']*)'`)
|
||||||
m := re_link.FindStringSubmatch(c)
|
m := re_link.FindStringSubmatch(c)
|
||||||
if len(m) > 1 {
|
if len(m) > 1 {
|
||||||
|
@ -579,10 +581,15 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk {
|
||||||
origin = originate(xid)
|
origin = originate(xid)
|
||||||
what = "bonk"
|
what = "bonk"
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
log.Printf("can't find link")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
log.Printf("no source content")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
var xonk Honk
|
var xonk Honk
|
||||||
// early init
|
// early init
|
||||||
xonk.UserID = user.ID
|
xonk.UserID = user.ID
|
||||||
|
|
Loading…
Reference in New Issue