fsdfd
This commit is contained in:
parent
ab18b16930
commit
20d13c4e54
4 changed files with 8 additions and 4 deletions
|
@ -34,6 +34,7 @@ class Comment(Base):
|
||||||
is_bot = Column(Boolean, default=False)
|
is_bot = Column(Boolean, default=False)
|
||||||
is_pinned = Column(String(255))
|
is_pinned = Column(String(255))
|
||||||
sentto=Column(Integer)
|
sentto=Column(Integer)
|
||||||
|
notifiedto=Column(Integer)
|
||||||
app_id = Column(Integer, ForeignKey("oauth_apps.id"))
|
app_id = Column(Integer, ForeignKey("oauth_apps.id"))
|
||||||
oauth_app = relationship("OauthApp", viewonly=True)
|
oauth_app = relationship("OauthApp", viewonly=True)
|
||||||
upvotes = Column(Integer, default=1)
|
upvotes = Column(Integer, default=1)
|
||||||
|
|
|
@ -25,6 +25,7 @@ def send_notification(vid, user, text):
|
||||||
distinguish_level=6,
|
distinguish_level=6,
|
||||||
body=text,
|
body=text,
|
||||||
body_html=text_html,
|
body_html=text_html,
|
||||||
|
notifiedto=uid
|
||||||
)
|
)
|
||||||
g.db.add(new_comment)
|
g.db.add(new_comment)
|
||||||
|
|
||||||
|
|
|
@ -354,7 +354,7 @@ def edit_post(pid, v):
|
||||||
|
|
||||||
message = f"@{v.username} has mentioned you: https://{site}{p.permalink}"
|
message = f"@{v.username} has mentioned you: https://{site}{p.permalink}"
|
||||||
for x in notify_users:
|
for x in notify_users:
|
||||||
existing = g.db.query(Comment).options(lazyload('*')).filter(Comment.author_id == NOTIFICATIONS_ACCOUNT, Comment.sentto == x.id, Comment.body == message).first()
|
existing = g.db.query(Comment).options(lazyload('*')).filter(Comment.author_id == NOTIFICATIONS_ACCOUNT, Comment.sentto == x.id, Comment.body == message, Comment.notifiedto == x.id).first()
|
||||||
if not existing: send_notification(NOTIFICATIONS_ACCOUNT, x, message)
|
if not existing: send_notification(NOTIFICATIONS_ACCOUNT, x, message)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<style>
|
<!-- <style>
|
||||||
.anchor::before {
|
.anchor::before {
|
||||||
display: block;
|
display: block;
|
||||||
content: " ";
|
content: " ";
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
background-color: initial;
|
background-color: initial;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style> -->
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>
|
||||||
|
|
||||||
|
@ -202,7 +202,9 @@
|
||||||
|
|
||||||
<a {% if v %}href="{{c.author.url}}"{% else %}href="/logged_out{{c.author.url}}"{% endif %} style="color:#{{c.author.namecolor}}; font-size:12px; font-weight:bold;"><img loading="lazy" src="{{c.author.profile_url}}" class="profile-pic-25 mr-2"/><span {% if c.author.patron and not c.distinguish_level %}class="patron" style="background-color:#{{c.author.namecolor}};"{% elif c.distinguish_level and 'rdrama' in request.host %}class="mod"{% endif %}>{{c.author.username}}</span></a>
|
<a {% if v %}href="{{c.author.url}}"{% else %}href="/logged_out{{c.author.url}}"{% endif %} style="color:#{{c.author.namecolor}}; font-size:12px; font-weight:bold;"><img loading="lazy" src="{{c.author.profile_url}}" class="profile-pic-25 mr-2"/><span {% if c.author.patron and not c.distinguish_level %}class="patron" style="background-color:#{{c.author.namecolor}};"{% elif c.distinguish_level and 'rdrama' in request.host %}class="mod"{% endif %}>{{c.author.username}}</span></a>
|
||||||
{% if c.author.customtitle %} <bdi style="color: #{{c.author.titlecolor}}"> {% if c.author.quadrant %}<img loading="lazy" height="20" src="/assets/images/PCM/quadrants/{{c.author.quadrant}}.webp">{% endif %}{{c.author.customtitle | safe}}</bdi>{% endif %}
|
{% if c.author.customtitle %} <bdi style="color: #{{c.author.titlecolor}}"> {% if c.author.quadrant %}<img loading="lazy" height="20" src="/assets/images/PCM/quadrants/{{c.author.quadrant}}.webp">{% endif %}{{c.author.customtitle | safe}}</bdi>{% endif %}
|
||||||
{% if c.parent_comment_id and not standalone and level<=7 %}<a href="#comment-{{ c.parent_comment_id }}" class="text-muted ml-2"><i class="fas fa-reply fa-sm fa-fw fa-flip-horizontal mr-1"></i>{{ c.parent_comment.author.username }}</a>{% endif %}
|
|
||||||
|
|
||||||
|
<!-- {% if c.parent_comment_id and not standalone and level<=7 %}<a href="#comment-{{ c.parent_comment_id }}" class="text-muted ml-2"><i class="fas fa-reply fa-sm fa-fw fa-flip-horizontal mr-1"></i>{{ c.parent_comment.author.username }}</a>{% endif %} -->
|
||||||
|
|
||||||
<span id="timestamp-{{c.id}}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="" class="time-stamp"> {{c.age_string}}</span>
|
<span id="timestamp-{{c.id}}" data-bs-toggle="tooltip" data-bs-placement="bottom" title="" class="time-stamp"> {{c.age_string}}</span>
|
||||||
{% if c.edited_utc %}
|
{% if c.edited_utc %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue