Fix \\n in the publicKey and add http 204 as a success condition
							parent
							
								
									f3e0c1bd61
								
							
						
					
					
						commit
						1120dff00d
					
				
							
								
								
									
										6
									
								
								actor.go
								
								
								
								
							
							
						
						
									
										6
									
								
								actor.go
								
								
								
								
							|  | @ -299,9 +299,9 @@ func (a *Actor) whoAmI() string { | |||
| 	self["followers"] = baseURL + a.Name + "/peers/followers" | ||||
| 	self["following"] = baseURL + a.Name + "/peers/following" | ||||
| 	self["publicKey"] = map[string]string{ | ||||
| 		"id" : baseURL + a.Name + "#main-key", | ||||
| 		"owner" : baseURL + a.Name, | ||||
| 		"publicKeyPem" : strings.ReplaceAll(a.publicKeyPem, "\n", "\\n"), | ||||
| 		"id":           baseURL + a.Name + "#main-key", | ||||
| 		"owner":        baseURL + a.Name, | ||||
| 		"publicKeyPem": a.publicKeyPem, | ||||
| 	} | ||||
| 	selfString, _ := json.Marshal(self) | ||||
| 	return string(selfString) | ||||
|  |  | |||
							
								
								
									
										2
									
								
								http.go
								
								
								
								
							
							
						
						
									
										2
									
								
								http.go
								
								
								
								
							|  | @ -241,7 +241,7 @@ func Serve(actors map[string]Actor) { | |||
| 			// pixelfed doesn't return the original follow thus the id is wrong so we
 | ||||
| 			// need to just check if we requested this actor
 | ||||
| 			if _, ok := actor.requested[acceptor]; !ok { | ||||
| 				log.Info("We never requested this follow, ignoring the Accept") | ||||
| 				log.Info("We never requested this follow from " + acceptor +", ignoring the Accept") | ||||
| 				return | ||||
| 			} | ||||
| 			// if pixelfed fixes https://github.com/pixelfed/pixelfed/issues/1710 we should uncomment
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue