Skip to content

Commit e5a1d69

Browse files
stefjowclaude
andcommitted
only accept map links with map settings
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 1c2a31c commit e5a1d69

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎lib/Toot.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,9 @@ def getPathOfLinksTo(self, to = tootsFetchSettings['link']):
227227
return [u.split(to, 1)[1] for u in matching_links]
228228

229229
def hasLinkTo(self, to = f"{tootsFetchSettings['link']}/@"):
230-
return len(self.getPathOfLinksTo(to)) > 0
230+
paths = self.getPathOfLinksTo(to)
231+
# Only accept links that contain "/map?" (i.e., have map settings/query params)
232+
return any('/map?' in path for path in paths)
231233

232234
def getUrl(self):
233235
if 'url' in self.data:

0 commit comments

Comments
 (0)