Renders a live two-way chat widget that polls for new messages and allows the current user to send messages to a conversation.
CHAT — set as ReportType in def_report.
def Render(self, Param1="", Param2="", Param3="") -> str:
Expects self.data_list to contain a single row with [conversation_id, client_id]. Renders a Bootstrap card with a scrollable message pane and a send box. Messages are polled every 10 seconds via axion.rpc.js RPC calls. Returns an HTML string.
RpcConversation(data={})Returns [last_stamp, html_fragment] containing all messages in the conversation since data["last_stamp"], formatted as AdminLTE direct-chat bubbles. Messages from data["client_id"] appear on the right; others on the left.
RpcSendmessage(data)Inserts a new message into track_conversation (both SQL and MongoDB) and returns updated conversation HTML.
RpcUsers(data={})Returns the list of distinct sender IDs in the conversation and refreshes their avatars via ObjUser.
Loads jquery.timeago.js and axion.rpc.js. Message timestamps are rendered with the timeago jQuery plugin for human-readable relative times. Conversation history is limited to the 20 most recent messages per poll.