Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.

Commit a1a49a9

Browse files
committed
get the whole conversation
1 parent 33a34f4 commit a1a49a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

controllers/peer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -587,9 +587,10 @@ def _get_user_answer(div_id, s):
587587

588588

589589
def _get_user_messages(user, div_id, course_name):
590+
# this gets both sides of the conversation -- thus the | in the query below.
590591
messages = db(
591592
(db.useinfo.event == "sendmessage")
592-
& (db.useinfo.sid == user)
593+
& ((db.useinfo.sid == user) | (db.useinfo.act.like(f"to:{user}%")))
593594
& (db.useinfo.div_id == div_id)
594595
& (db.useinfo.course_id == course_name)
595596
).select(orderby=db.useinfo.id)

0 commit comments

Comments
 (0)