Skip to content

Commit

Permalink
added desc on create
Browse files Browse the repository at this point in the history
  • Loading branch information
SushieeK committed Nov 14, 2023
1 parent be51313 commit e7c75cf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chat/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
def chatting(request, recipient_id):
recipient = get_object_or_404(User, id=recipient_id)
messages = Message.objects.filter(
(Q(sender=request.user) & Q(recipient=recipient)) | (Q(sender=recipient) & Q(recipient=request.user))
(Q(sender=request.user) & Q(recipient=recipient))
| (Q(sender=recipient) & Q(recipient=request.user))
).order_by("timestamp")

if request.method == "POST":
Expand Down

0 comments on commit e7c75cf

Please sign in to comment.