From 70cc32d871922ad67a46d4434cf697bbd8c2e38a Mon Sep 17 00:00:00 2001 From: Aevann Date: Thu, 12 Oct 2023 17:20:28 +0300 Subject: [PATCH] imginn -> imgsed --- files/classes/comment.py | 4 ++-- files/classes/user.py | 2 +- files/routes/settings.py | 2 +- files/templates/settings/advanced.html | 2 +- migrations/20231012-imginn-to-imgsed.sql | 1 + schema.sql | 3 +-- 6 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 migrations/20231012-imginn-to-imgsed.sql diff --git a/files/classes/comment.py b/files/classes/comment.py index fb6fe4ae0..a8a5f3180 100644 --- a/files/classes/comment.py +++ b/files/classes/comment.py @@ -64,8 +64,8 @@ def normalize_urls_runtime(body, v): if v and v.nitter: body = twitter_to_nitter_regex.sub(r'\1https://nitter.net/', body) - if v and v.imginn: - body = body.replace('https://instagram.com/', 'https://imginn.com/') + if v and v.imgsed: + body = body.replace('https://instagram.com/', 'https://imgsed.com/') if not v or v.controversial: captured = [] diff --git a/files/classes/user.py b/files/classes/user.py index c7ed0210a..69ee31cf3 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -103,7 +103,7 @@ class User(Base): newtabexternal = Column(Boolean, default=True) reddit = Column(String, default='old.reddit.com') nitter = Column(Boolean) - imginn = Column(Boolean) + imgsed = Column(Boolean) frontsize = Column(Integer, default=25) controversial = Column(Boolean, default=False) bio = deferred(Column(String)) diff --git a/files/routes/settings.py b/files/routes/settings.py index 7c62c006d..e320a945b 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -159,7 +159,7 @@ def settings_personal_post(v): updated = updated or update_flag("newtab", "newtab") updated = updated or update_flag("newtabexternal", "newtabexternal") updated = updated or update_flag("nitter", "nitter") - updated = updated or update_flag("imginn", "imginn") + updated = updated or update_flag("imgsed", "imgsed") updated = updated or update_flag("controversial", "controversial") updated = updated or update_flag("show_sigs", "show_sigs") updated = updated or update_flag("is_private", "private") diff --git a/files/templates/settings/advanced.html b/files/templates/settings/advanced.html index 35edb363f..0961d626a 100644 --- a/files/templates/settings/advanced.html +++ b/files/templates/settings/advanced.html @@ -103,7 +103,7 @@
External Services
{{common.toggle_section("Use Nitter for Twitter Links", "nitter", "nitter", v.nitter, "Enable if you would like to automatically convert twitter.com links to nitter.net links.", false)}} - {{common.toggle_section("Use Imginn for Instagram Links", "imginn", "imginn", v.imginn, "Enable if you would like to automatically convert instagram.com links to imginn.com links.", false)}} + {{common.toggle_section("Use imgsed for Instagram Links", "imgsed", "imgsed", v.imgsed, "Enable if you would like to automatically convert instagram.com links to imgsed.com links.", false)}}
diff --git a/migrations/20231012-imginn-to-imgsed.sql b/migrations/20231012-imginn-to-imgsed.sql new file mode 100644 index 000000000..2ebff946d --- /dev/null +++ b/migrations/20231012-imginn-to-imgsed.sql @@ -0,0 +1 @@ +alter table users rename column imginn to imgsed; diff --git a/schema.sql b/schema.sql index 722c13f3b..f8242b9e0 100644 --- a/schema.sql +++ b/schema.sql @@ -154,7 +154,7 @@ CREATE TABLE public.users ( last_viewed_post_notifs integer NOT NULL, pronouns character varying(15) NOT NULL, last_viewed_log_notifs integer NOT NULL, - imginn boolean, + imgsed boolean, earlylife integer, bite integer, old_house character varying(16), @@ -3045,4 +3045,3 @@ ALTER TABLE ONLY public.comments -- -- PostgreSQL database dump complete -- -