we aren't interested in random reactions
This commit is contained in:
parent
921524a42a
commit
3bf1d21145
9
web.go
9
web.go
|
@ -329,7 +329,8 @@ func inbox(w http.ResponseWriter, r *http.Request) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
what, _ := j.GetString("type")
|
what, _ := j.GetString("type")
|
||||||
if what == "Like" {
|
obj, _ := j.GetString("object")
|
||||||
|
if what == "Like" || (what == "EmojiReaction" && originate(obj) != serverName) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
who, _ := j.GetString("actor")
|
who, _ := j.GetString("actor")
|
||||||
|
@ -361,14 +362,12 @@ func inbox(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
switch what {
|
switch what {
|
||||||
case "Ping":
|
case "Ping":
|
||||||
obj, _ := j.GetString("id")
|
id, _ := j.GetString("id")
|
||||||
log.Printf("ping from %s: %s", who, obj)
|
log.Printf("ping from %s: %s", who, id)
|
||||||
pong(user, who, obj)
|
pong(user, who, obj)
|
||||||
case "Pong":
|
case "Pong":
|
||||||
obj, _ := j.GetString("object")
|
|
||||||
log.Printf("pong from %s: %s", who, obj)
|
log.Printf("pong from %s: %s", who, obj)
|
||||||
case "Follow":
|
case "Follow":
|
||||||
obj, _ := j.GetString("object")
|
|
||||||
if obj != user.URL {
|
if obj != user.URL {
|
||||||
log.Printf("can't follow %s", obj)
|
log.Printf("can't follow %s", obj)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue