MCPcopy
hub / github.com/HelloZeroNet/ZeroNet / actionListModified

Method actionListModified

src/File/FileRequest.py:342–355  ·  view source on GitHub ↗
(self, params)

Source from the content-addressed store, hash-verified

340
341 # Get modified content.json files since
342 def actionListModified(self, params):
343 site = self.sites.get(params["site"])
344 if not site or not site.isServing(): # Site unknown or not serving
345 self.response({"error": "Unknown site"})
346 self.connection.badAction(5)
347 return False
348 modified_files = site.content_manager.listModified(params["since"])
349
350 # Add peer to site if not added before
351 connected_peer = site.addPeer(self.connection.ip, self.connection.port, source="request")
352 if connected_peer: # Just added
353 connected_peer.connect(self.connection) # Assign current connection to peer
354
355 self.response({"modified_files": modified_files})
356
357 def actionGetHashfield(self, params):
358 site = self.sites.get(params["site"])

Callers

nothing calls this directly

Calls 7

responseMethod · 0.95
isServingMethod · 0.80
badActionMethod · 0.80
addPeerMethod · 0.80
getMethod · 0.45
listModifiedMethod · 0.45
connectMethod · 0.45

Tested by

no test coverage detected