There is a dialog system that is set up according to the principle of reference set=1_2 "1" is the sender's id, the recipient's "2", clicking on a similar link, all incoming incoming / outgoing messages are thrown
How to find a list of people with whom I have a dialogue (even if it is not mutual) with the smallest logical operations