rename private_chats to chats
parent
ffaebc0960
commit
75236cacbe
|
@ -40,4 +40,4 @@ if FEATURES['IP_LOGGING']:
|
||||||
from .ip_logs import *
|
from .ip_logs import *
|
||||||
|
|
||||||
from .edit_logs import *
|
from .edit_logs import *
|
||||||
from .private_chats import *
|
from .chats import *
|
||||||
|
|
|
@ -14,7 +14,7 @@ from files.classes import Base
|
||||||
from files.classes.casino_game import CasinoGame
|
from files.classes.casino_game import CasinoGame
|
||||||
from files.classes.group import *
|
from files.classes.group import *
|
||||||
from files.classes.hole import Hole
|
from files.classes.hole import Hole
|
||||||
from files.classes.private_chats import ChatMembership
|
from files.classes.chats import ChatMembership
|
||||||
from files.classes.currency_logs import CurrencyLog
|
from files.classes.currency_logs import CurrencyLog
|
||||||
from files.helpers.config.const import *
|
from files.helpers.config.const import *
|
||||||
from files.helpers.config.modaction_types import *
|
from files.helpers.config.modaction_types import *
|
||||||
|
|
|
@ -8,7 +8,7 @@ from files.classes.user import User
|
||||||
from files.classes.post import Post
|
from files.classes.post import Post
|
||||||
from files.classes.comment import Comment
|
from files.classes.comment import Comment
|
||||||
from files.classes.votes import Vote, CommentVote
|
from files.classes.votes import Vote, CommentVote
|
||||||
from files.classes.private_chats import ChatMessage
|
from files.classes.chats import ChatMessage
|
||||||
from files.classes.emoji import *
|
from files.classes.emoji import *
|
||||||
from files.classes.award import AwardRelationship
|
from files.classes.award import AwardRelationship
|
||||||
from files.helpers.config.const import *
|
from files.helpers.config.const import *
|
||||||
|
|
|
@ -53,7 +53,7 @@ from .special import *
|
||||||
from .push_notifs import *
|
from .push_notifs import *
|
||||||
if FEATURES['PING_GROUPS']:
|
if FEATURES['PING_GROUPS']:
|
||||||
from .groups import *
|
from .groups import *
|
||||||
from .private_chats import *
|
from .chats import *
|
||||||
|
|
||||||
if IS_LOCALHOST:
|
if IS_LOCALHOST:
|
||||||
from sys import argv
|
from sys import argv
|
||||||
|
|
|
@ -16,7 +16,7 @@ from files.helpers.alerts import push_notif
|
||||||
from files.helpers.can_see import *
|
from files.helpers.can_see import *
|
||||||
from files.routes.wrappers import *
|
from files.routes.wrappers import *
|
||||||
from files.classes.orgy import *
|
from files.classes.orgy import *
|
||||||
from files.classes.private_chats import *
|
from files.classes.chats import *
|
||||||
|
|
||||||
from files.__main__ import app, cache, limiter
|
from files.__main__ import app, cache, limiter
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
from files.classes.private_chats import *
|
from files.classes.chats import *
|
||||||
from files.routes.wrappers import *
|
from files.routes.wrappers import *
|
||||||
from files.helpers.config.const import *
|
from files.helpers.config.const import *
|
||||||
from files.helpers.get import *
|
from files.helpers.get import *
|
||||||
|
@ -58,7 +58,7 @@ def chat_user(v, username):
|
||||||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
|
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400)
|
||||||
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
@limiter.limit(DEFAULT_RATELIMIT, deduct_when=lambda response: response.status_code < 400, key_func=get_ID)
|
||||||
@auth_required
|
@auth_required
|
||||||
def private_chat(v, chat_id):
|
def chat(v, chat_id):
|
||||||
chat = g.db.get(Chat, chat_id)
|
chat = g.db.get(Chat, chat_id)
|
||||||
if not chat:
|
if not chat:
|
||||||
abort(404, "Chat not found!")
|
abort(404, "Chat not found!")
|
||||||
|
@ -84,7 +84,7 @@ def private_chat(v, chat_id):
|
||||||
query = g.db.query(ChatMembership).filter_by(chat_id=chat.id)
|
query = g.db.query(ChatMembership).filter_by(chat_id=chat.id)
|
||||||
sorted_memberships = [query.filter_by(user_id=chat.owner_id).one()] + query.filter(ChatMembership.user_id != chat.owner_id).join(ChatMembership.user).order_by(func.lower(User.username)).all()
|
sorted_memberships = [query.filter_by(user_id=chat.owner_id).one()] + query.filter(ChatMembership.user_id != chat.owner_id).join(ChatMembership.user).order_by(func.lower(User.username)).all()
|
||||||
|
|
||||||
return render_template("private_chat.html", v=v, messages=displayed_messages, chat=chat, sorted_memberships=sorted_memberships)
|
return render_template("chat.html", v=v, messages=displayed_messages, chat=chat, sorted_memberships=sorted_memberships)
|
||||||
|
|
||||||
|
|
||||||
@app.post("/chat/<int:chat_id>/name")
|
@app.post("/chat/<int:chat_id>/name")
|
|
@ -5,7 +5,7 @@ from sqlalchemy.orm import load_only
|
||||||
|
|
||||||
from files.classes.mod_logs import ModAction
|
from files.classes.mod_logs import ModAction
|
||||||
from files.classes.hole_logs import HoleAction
|
from files.classes.hole_logs import HoleAction
|
||||||
from files.classes.private_chats import *
|
from files.classes.chats import *
|
||||||
from files.helpers.config.const import *
|
from files.helpers.config.const import *
|
||||||
from files.helpers.config.modaction_types import *
|
from files.helpers.config.modaction_types import *
|
||||||
from files.helpers.get import *
|
from files.helpers.get import *
|
||||||
|
|
Loading…
Reference in New Issue