Browse Source

Updated to work with the latest version of slixmpp

DeadTOm 1 week ago
parent
commit
0e728ba8b8
1 changed files with 2 additions and 1 deletions
  1. 2 1
      hooks.py

+ 2 - 1
hooks.py

@@ -6,6 +6,7 @@ import time
 import socket
 import slixmpp
 import sys
+import asyncio
 
 logging.basicConfig(filename=config.owncast_logfile, level=logging.INFO)
 
@@ -35,7 +36,7 @@ def xmpp_chat(ownchat_msg):  # Send messages to XMPP
     xmpp.register_plugin('xep_0030')  # Service Discovery
     xmpp.register_plugin('xep_0199')  # XMPP Ping
     xmpp.connect()
-    xmpp.process(forever=False)
+    asyncio.get_event_loop().run_until_complete(xmpp.disconnected)
 
 
 @app.route('/user_left/', methods=["POST"])  # Notify XMPP that a user left