forked from MarseyWorld/MarseyWorld
more accurate description
parent
d56ddd882a
commit
2e3332d773
|
@ -14,7 +14,7 @@ from files.classes import Base
|
|||
from files.classes.casino_game import CasinoGame
|
||||
from files.classes.group import *
|
||||
from files.classes.hole import Hole
|
||||
from files.classes.chats import ChatMembership
|
||||
from files.classes.chats import *
|
||||
from files.classes.currency_logs import CurrencyLog
|
||||
from files.helpers.config.const import *
|
||||
from files.helpers.config.modaction_types import *
|
||||
|
@ -691,7 +691,7 @@ class User(Base):
|
|||
@property
|
||||
@lazy
|
||||
def chat_count(self):
|
||||
return g.db.query(ChatMembership).filter_by(user_id=self.id).count()
|
||||
return g.db.query(ChatMessage).distinct(ChatMessage.chat_id).filter_by(user_id=self.id).count()
|
||||
|
||||
@property
|
||||
@lazy
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
{%- endif %}
|
||||
|
||||
{% if v.admin_level >= PERMS['VIEW_CHATS'] %}
|
||||
<div id="profile--chats" class="mb-2">Member of <a href="/@{{u.username}}/chats">{{u.chat_count|commas}} chat{{'s' if u.chat_count != 1 else ''}}</a></div>
|
||||
<div id="profile--chats" class="mb-2">Spoke in <a href="/@{{u.username}}/chats">{{u.chat_count|commas}} chat{{'s' if u.chat_count != 1 else ''}}</a></div>
|
||||
{% endif %}
|
||||
|
||||
{% if v.admin_level >= PERMS['USER_BAN'] %}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{% extends "default.html" %}
|
||||
{% block pagetitle %}@{{u.username}}'s Chat Memberships{% endblock %}
|
||||
{% block pagetitle %}@{{u.username}}'s Chats{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h5 class="pt-4 pl-2 pb-3">@{{u.username}}'s Chat Memberships ({{total}} chat{{macros.plural(total)}})</h5>
|
||||
<h5 class="pt-4 pl-2 pb-3">@{{u.username}}'s Chats ({{total}} chat{{macros.plural(total)}})</h5>
|
||||
<div class="overflow-x-auto">
|
||||
<table>
|
||||
<thead>
|
||||
|
|
Loading…
Reference in New Issue