MCPcopy Create free account
hub / github.com/chatmail/core / send_status_update

Method send_status_update

python/src/deltachat/message.py:145–164  ·  view source on GitHub ↗

Send an status update for the webxdc instance of this message. If the webxdc instance is a draft, the update is not sent immediately. Instead, the updates are collected and sent out in a batch when the instance is actually sent. :param json_data: program-readable data, the

(self, json_data: Union[str, dict], description: str)

Source from the content-addressed store, hash-verified

143 )
144
145 def send_status_update(self, json_data: Union[str, dict], description: str) -> bool:
146 """Send an status update for the webxdc instance of this message.
147
148 If the webxdc instance is a draft, the update is not sent immediately.
149 Instead, the updates are collected and sent out in a batch when the instance is actually sent.
150
151 :param json_data: program-readable data, the actual payload.
152 :param description: The user-visible description of JSON data
153 :returns: True on success, False otherwise
154 """
155 if isinstance(json_data, dict):
156 json_data = json.dumps(json_data, default=str)
157 return bool(
158 lib.dc_send_webxdc_status_update(
159 self.account._dc_context,
160 self.id,
161 as_dc_charpointer(json_data),
162 as_dc_charpointer(description),
163 ),
164 )
165
166 def is_system_message(self):
167 """return True if this message is a system/info message."""

Callers 2

test_webxdc_messageFunction · 0.80
test_webxdc_huge_updateFunction · 0.80

Calls 1

as_dc_charpointerFunction · 0.85

Tested by 2

test_webxdc_messageFunction · 0.64
test_webxdc_huge_updateFunction · 0.64