-
Notifications
You must be signed in to change notification settings - Fork 88
Result HTML Customization (Docs In Progress)
Knugi edited this page Oct 24, 2022
·
2 revisions
You can design your own WhatsApp conversation page by creating a Jinja template.
- name (str): The peer or group of the conversation.
- msgs (list): A list containing messages-related data including the message itself.
- my_avatar (str): Path to the user's avatar.
- their_avatar (str): Path to the avatar of the peer or the group of the conversation.
As stated, msgs is a list. Inside the msgs variable, each item in the list is a dict containing the following keys
- sender (str|None): The name or the phone number of the message sender.
- time (str): The time of the message being sent. In format "%H:%M".
- key_id (str): The message ID in the WhatsApp database.
- timestamp (int): The timestamp of the message in second.
- from_me (bool): Whether the message is sent by you or the peer(s)
- reply (str|None): If the message is replying to some message, this will be the ID of the message being replied.
- media (bool): Whether the message is a media.
- meta (bool): Whether the message is a metadata. For example, someone join the group.
- data (str|None): The actually message or metadata.
- quoted_data (str|None): The actually message that being replied.
- mime (str|None): The MIME type of the media.
- caption (str|None): The caption along with media.