blockdict = []
blocker = fba.tidyup(blocker)
if software == "pleroma":
- print("DEBUG: blocker:", blocker)
+ print("INFO: blocker:", blocker)
try:
# Blocks
federation = reqto.get(
**{"quarantined_instances": federation["quarantined_instances"]}}
).items():
for blocked in blocks:
+ print("DEBUG: BEFORE blocked:", blocked)
blocked = fba.tidyup(blocked)
+ print("DEBUG: AFTER blocked:", blocked)
if blocked == "":
print("WARNING: blocked is empty after fba.tidyup():", blocker, block_level)
"SELECT domain FROM instances WHERE domain LIKE ? ORDER BY rowid LIMIT 1", (blocked.replace("*", "_"),)
)
searchres = fba.c.fetchone()
+ print("DEBUG: searchres[]:", type(searchres))
if searchres != None:
blocked = searchres[0]
+ print("DEBUG: Looking up instance by domain:", blocked)
fba.c.execute(
"SELECT domain FROM instances WHERE domain = ?", (blocked,)
)
if fba.c.fetchone() == None:
- print("DEBUG: Hash wasn't found, adding:", blocked)
+ print("DEBUG: Domain wasn't found, adding:", blocked)
fba.add_instance(blocked)
timestamp = int(time.time())
block_level
),
)
+
if fba.c.fetchone() == None:
- fba.block_instance(blocker, blocked, reason, block_level, timestamp, timestamp)
+ fba.block_instance(blocker, blocked, "unknown", block_level, timestamp, timestamp)
if block_level == "reject":
blockdict.append(
except Exception as e:
print("error:", e, blocker, software)
elif software == "mastodon":
- print("DEBUG: blocker:", blocker)
+ print("INFO: blocker:", blocker)
try:
# json endpoint for newer mastodongs
try:
except Exception as e:
print("error:", e, blocker, software)
elif software == "friendica" or software == "misskey":
- print("DEBUG: blocker:", blocker)
+ print("INFO: blocker:", blocker)
try:
if software == "friendica":
json = fba.get_friendica_blocks(blocker)
except Exception as e:
print("error:", e, blocker, software)
elif software == "gotosocial":
- print("DEBUG: blocker:", blocker)
+ print("INFO: blocker:", blocker)
try:
# Blocks
federation = reqto.get(