# How does the server proactively send UNO commands to the client

**URL:** <https://forum.collaboraonline.com/t/how-does-the-server-proactively-send-uno-commands-to-the-client/2787>\
**Category:** User Support\
**Created:** [July 16, 2024, 8:02am UTC](https://forum.collaboraonline.com/t/how-does-the-server-proactively-send-uno-commands-to-the-client/2787 "2024-07-16T08:02:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gulixiang](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/gulixiang/32/1227_2.png) [@gulixiang](https://forum.collaboraonline.com/u/gulixiang)\
**Post date:** [July 16, 2024, 8:02am UTC](https://forum.collaboraonline.com/t/how-does-the-server-proactively-send-uno-commands-to-the-client/2787/1 "2024-07-16T08:02:28Z")

</div>

My scenario is like this: I added a document modification listener XDDocumentEventListener using Python interface on a Word document. When the document changes, I want to send it to all current collaborative editing users and tell them what the modified document content is

---

<div class="post-metadata">

**Author:** ![vmiklos](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/vmiklos/32/787_2.png) [@vmiklos](https://forum.collaboraonline.com/u/vmiklos)\
**Post date:** [July 17, 2024, 7:27am UTC](https://forum.collaboraonline.com/t/how-does-the-server-proactively-send-uno-commands-to-the-client/2787/2 "2024-07-17T07:27:44Z")

</div>

Your Python script uses the UNO API of the core.git code and there is no UNO API for emitting LOK API callbacks, so you can’t do that directly.

However, what you can do is that once you modify the document, all editing users will receive a notification that the state of the UNO command responsible for the modification status has changed. This also results in a postmessage API call, see [PostMessage API — SDK https://sdk.collaboraonline.com/ documentation](https://sdk.collaboraonline.com/docs/postmessage_api.html) – it’s something you can listen for in your integration of COOL.

At this point you can run a server-side python script that e.g. selects the entire document and send the plain text version of the selection or something like that.

---

<div class="post-metadata">

**Author:** ![darshan](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/darshan/32/2230_2.png) [@darshan](https://forum.collaboraonline.com/u/darshan)\
**Post date:** [August 6, 2024, 9:53am UTC](https://forum.collaboraonline.com/t/how-does-the-server-proactively-send-uno-commands-to-the-client/2787/3 "2024-08-06T09:53:14Z")

</div>

Closed on August 6, 2024, 9:53am UTC


