remove fish award

master
Aevann 2023-08-11 16:18:13 +03:00
parent 3ec2038caf
commit 45be4132ce
4 changed files with 13 additions and 25 deletions

View File

@ -1258,11 +1258,6 @@ class User(Base):
def unblockable(self):
return self.has_badge(87)
@property
@lazy
def fish(self):
return self.has_badge(90)
@property
@lazy
def offsitementions(self):

View File

@ -42,6 +42,19 @@ AWARDS = {
"ghost": False,
"enabled": False,
},
"fish": {
"kind": "fish",
"title": "Fish",
"description": "This user cannot be unfollowed",
"icon": "fas fa-fish",
"color": "text-gold",
"price": 20000,
"deflectable": True,
"cosmetic": False,
"ghost": False,
"enabled": False,
},
### Fistmas
"lootbox": {
@ -735,18 +748,6 @@ AWARDS = {
"ghost": False,
"enabled": True,
},
"fish": {
"kind": "fish",
"title": "Fish",
"description": "This user cannot be unfollowed",
"icon": "fas fa-fish",
"color": "text-gold",
"price": 20000,
"deflectable": True,
"cosmetic": False,
"ghost": False,
"enabled": True,
},
"pause": {
"kind": "pause",
"title": "Pause",

View File

@ -449,8 +449,6 @@ def award_thing(v, thing_type, id):
elif kind == "unblockable":
badge_grant(badge_id=87, user=author)
for block in g.db.query(UserBlock).filter_by(target_id=author.id): g.db.delete(block)
elif kind == "fish":
badge_grant(badge_id=90, user=author)
elif kind == "progressivestack":
if not FEATURES['PINS']:
abort(403)

View File

@ -1224,12 +1224,6 @@ def unfollow_user(username, v):
target = get_user(username)
if target.fish:
if not v.shadowbanned:
send_notification(target.id, f"@{v.username} has tried to unfollow you and failed because of your fish award!")
g.db.commit()
abort(400, f"You can't unfollow @{target.username}")
follow = g.db.query(Follow).filter_by(user_id=v.id, target_id=target.id).one_or_none()
if follow: