forked from rDrama/rDrama
sdfsdf
parent
e99cc72a35
commit
4b256b649b
|
@ -209,7 +209,7 @@ class Comment(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def shortlink(self):
|
def shortlink(self):
|
||||||
return f"http://{site}/comment/{self.id}#context"
|
return f"/comment/{self.id}#context"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
|
|
|
@ -179,7 +179,7 @@ class Submission(Base):
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
def shortlink(self):
|
def shortlink(self):
|
||||||
return f"http://{site}/post/{self.id}"
|
return f"/post/{self.id}"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@lazy
|
@lazy
|
||||||
|
|
|
@ -541,7 +541,7 @@ def award_post(pid, v):
|
||||||
elif kind == "pizzashill":
|
elif kind == "pizzashill":
|
||||||
if author.longpost: author.longpost += 86400
|
if author.longpost: author.longpost += 86400
|
||||||
else: author.longpost = time.time() + 86400
|
else: author.longpost = time.time() + 86400
|
||||||
send_notification(IDIO_ID, f"@{v.username} used {kind} award on {post.shortlink}")
|
send_notification(IDIO_ID, f"@{v.username} used {kind} award on {request.host_url}{post.shortlink}")
|
||||||
elif kind == "eye":
|
elif kind == "eye":
|
||||||
author.eye = True
|
author.eye = True
|
||||||
send_notification(CARP_ID, f"@{v.username} used {kind} award!")
|
send_notification(CARP_ID, f"@{v.username} used {kind} award!")
|
||||||
|
@ -675,7 +675,7 @@ def award_comment(cid, v):
|
||||||
elif kind == "pizzashill":
|
elif kind == "pizzashill":
|
||||||
if author.longpost: author.longpost += 86400
|
if author.longpost: author.longpost += 86400
|
||||||
else: author.longpost = time.time() + 86400
|
else: author.longpost = time.time() + 86400
|
||||||
send_notification(IDIO_ID, f"@{v.username} used {kind} award on {c.shortlink}")
|
send_notification(IDIO_ID, f"@{v.username} used {kind} award on {request.host_url}{c.shortlink}")
|
||||||
elif kind == "eye":
|
elif kind == "eye":
|
||||||
author.eye = True
|
author.eye = True
|
||||||
send_notification(CARP_ID, f"@{v.username} used {kind} award!")
|
send_notification(CARP_ID, f"@{v.username} used {kind} award!")
|
||||||
|
|
Loading…
Reference in New Issue