flaskbb-plugin-conversations 2.0.0__tar.gz → 2.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/PKG-INFO +1 -1
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/utils.py +1 -1
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/views.py +14 -14
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/pyproject.toml +1 -1
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/.gitignore +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/LICENSE +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/README.md +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/__init__.py +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/forms.py +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/migrations/201802171929_0625bc75ab77_add_conversations.py +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/migrations/202602062122_1770409336_update_sqlalchemy_2.py +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/migrations/__init__.py +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/models.py +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/templates/_inject_navlink.html +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/templates/_inject_new_message_button.html +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/templates/_inject_new_message_link.html +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/templates/conversation.html +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/templates/conversation_list.html +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/templates/drafts.html +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/templates/inbox.html +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/templates/message_form.html +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/templates/message_layout.html +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/templates/sent.html +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/templates/trash.html +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/translations/en/LC_MESSAGES/messages.po +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/tests/conftest.py +0 -0
- {flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/tests/test_message_models.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flaskbb-plugin-conversations
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: A private messaging plugin for FlaskBB
|
|
5
5
|
Project-URL: Homepage, https://github.com/flaskbb/flaskbb-plugin-conversations
|
|
6
6
|
Project-URL: Repository, https://github.com/flaskbb/flaskbb-plugin-conversations
|
{flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/views.py
RENAMED
|
@@ -78,18 +78,18 @@ class Inbox(MethodView):
|
|
|
78
78
|
def get(self):
|
|
79
79
|
page = request.args.get("page", 1, type=int)
|
|
80
80
|
# the inbox will display both, the recieved and the sent messages
|
|
81
|
-
|
|
82
|
-
Conversation
|
|
81
|
+
stmt = (
|
|
82
|
+
select(Conversation)
|
|
83
|
+
.where(
|
|
83
84
|
Conversation.user_id == current_user.id,
|
|
84
|
-
Conversation.draft
|
|
85
|
-
Conversation.trash
|
|
85
|
+
Conversation.draft.is_(False),
|
|
86
|
+
Conversation.trash.is_(False),
|
|
86
87
|
)
|
|
87
88
|
.order_by(Conversation.date_modified.desc())
|
|
88
|
-
.paginate(
|
|
89
|
-
page=page, per_page=flaskbb_config["TOPICS_PER_PAGE"], error_out=False
|
|
90
|
-
)
|
|
91
89
|
)
|
|
92
|
-
|
|
90
|
+
conversations = db.paginate(
|
|
91
|
+
stmt, page=page, per_page=flaskbb_config["TOPICS_PER_PAGE"], error_out=False
|
|
92
|
+
)
|
|
93
93
|
return render_template("inbox.html", conversations=conversations)
|
|
94
94
|
|
|
95
95
|
|
|
@@ -347,9 +347,9 @@ class RestoreConversation(MethodView):
|
|
|
347
347
|
decorators = [login_required]
|
|
348
348
|
|
|
349
349
|
def post(self, conversation_id: int):
|
|
350
|
-
conversation = Conversation.
|
|
351
|
-
id
|
|
352
|
-
)
|
|
350
|
+
conversation = Conversation.get_or_404(
|
|
351
|
+
Conversation.id == conversation_id, Conversation.user_id == current_user.id
|
|
352
|
+
)
|
|
353
353
|
|
|
354
354
|
conversation.trash = False
|
|
355
355
|
conversation.save()
|
|
@@ -360,9 +360,9 @@ class DeleteConversation(MethodView):
|
|
|
360
360
|
decorators = [login_required]
|
|
361
361
|
|
|
362
362
|
def post(self, conversation_id: int):
|
|
363
|
-
conversation = Conversation.
|
|
364
|
-
id
|
|
365
|
-
)
|
|
363
|
+
conversation = Conversation.get_or_404(
|
|
364
|
+
Conversation.id == conversation_id, Conversation.user_id == current_user.id
|
|
365
|
+
)
|
|
366
366
|
|
|
367
367
|
conversation.delete()
|
|
368
368
|
invalidate_cache(real(current_user).id)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/__init__.py
RENAMED
|
File without changes
|
{flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/forms.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flaskbb_plugin_conversations-2.0.0 → flaskbb_plugin_conversations-2.0.2}/conversations/models.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|