The first thing to do with our ChatWindow is allow it to receive the username variable:
class ChatWindow(tk.Toplevel):
def __init__(self, master, friend_name, friend_username, friend_avatar, **kwargs):
...
self.friend_username = friend_username
You may be wondering why we need this variable here. The reason we will be requiring it is to help keep track of the conversation history.
There will be a separate database holding conversations between you and each individual friend, to make for very easy retrieval of the conversation history. This will, of course, require changes to our web service and, of course, our Requester will need to be updated too.
Let's begin with the necessary server adjustments to facilitate the conversation databases.