▲ 197 ▼ Fun fact: you can't upload this image on piefed.social (thelemmy.club) submitted 8 months ago by irelephant@lemmy.dbzer0.com to c/fediverse@lemmy.world 164 comments fedilink hide all child comments https://codeberg.org/rimu/pyfedi/src/commit/6405e51dab23f43eaea18d0ee4d9e7a773a3fd31/app/community/forms.py#L335 deliberately misleading error message.
[+] irelephant@lemmy.dbzer0.com [S] 30 points 8 months ago* (last edited 3 weeks ago) (3 children) [deleted] permalink fedilink source hideshow 3 child comments replies: [–] flamingos@feddit.uk 15 points 8 months ago* (last edited 8 months ago) I was curious to see how they handle this on the fedi side, because they obviously can't stop you from uploading images to other instances, so decided to do some digging myself. The fedi code for this is here and looks like this: # Alert regarding fascist meme content if site.enable_chan_image_filter and toxic_community and img_width < 2000: # images > 2000px tend to be real photos instead of 4chan screenshots. if os.environ.get('ALLOW_4CHAN', None) is None: try: image_text = pytesseract.image_to_string( Image.open(BytesIO(source_image)).convert('L'), timeout=30) except Exception: image_text = '' if 'Anonymous' in image_text and ( 'No.' in image_text or ' N0' in image_text): # chan posts usually contain the text 'Anonymous' and ' No.12345' post = session.query(Post).filter_by(image_id=file.id).first() targets_data = {'gen': '0', 'post_id': post.id, 'orig_post_title': post.title, 'orig_post_body': post.body } notification = Notification(title='Review this', user_id=1, author_id=post.user_id, url=post.slug, notif_type=NOTIF_REPORT, subtype='post_with_suspicious_image', targets=targets_data) session.add(notification) session.commit() The curious thing here, apart from there being both an environmental variable and site setting for this, is the toxic_community variable. This seems to be a renaming of the low_quality field Piefed applies to communities, which are just communities with either memes or shitpost in their name. You also don't get social credits docked for this. permalink fedilink source parent [–] ZombiFrancis@sh.itjust.works 14 points 8 months ago (1 child) current_user.reputation -= 1 So what exactly is going on there? permalink fedilink source parent hideshow 1 child comment replies: [–] goferking0@lemmy.sdf.org 22 points 8 months ago Piefed punishes users for wrong think/not acting like the creator wants permalink fedilink source parent
[–] flamingos@feddit.uk 15 points 8 months ago* (last edited 8 months ago) I was curious to see how they handle this on the fedi side, because they obviously can't stop you from uploading images to other instances, so decided to do some digging myself. The fedi code for this is here and looks like this: # Alert regarding fascist meme content if site.enable_chan_image_filter and toxic_community and img_width < 2000: # images > 2000px tend to be real photos instead of 4chan screenshots. if os.environ.get('ALLOW_4CHAN', None) is None: try: image_text = pytesseract.image_to_string( Image.open(BytesIO(source_image)).convert('L'), timeout=30) except Exception: image_text = '' if 'Anonymous' in image_text and ( 'No.' in image_text or ' N0' in image_text): # chan posts usually contain the text 'Anonymous' and ' No.12345' post = session.query(Post).filter_by(image_id=file.id).first() targets_data = {'gen': '0', 'post_id': post.id, 'orig_post_title': post.title, 'orig_post_body': post.body } notification = Notification(title='Review this', user_id=1, author_id=post.user_id, url=post.slug, notif_type=NOTIF_REPORT, subtype='post_with_suspicious_image', targets=targets_data) session.add(notification) session.commit() The curious thing here, apart from there being both an environmental variable and site setting for this, is the toxic_community variable. This seems to be a renaming of the low_quality field Piefed applies to communities, which are just communities with either memes or shitpost in their name. You also don't get social credits docked for this. permalink fedilink source parent
[–] ZombiFrancis@sh.itjust.works 14 points 8 months ago (1 child) current_user.reputation -= 1 So what exactly is going on there? permalink fedilink source parent hideshow 1 child comment replies: [–] goferking0@lemmy.sdf.org 22 points 8 months ago Piefed punishes users for wrong think/not acting like the creator wants permalink fedilink source parent
[–] goferking0@lemmy.sdf.org 22 points 8 months ago Piefed punishes users for wrong think/not acting like the creator wants permalink fedilink source parent