MCPcopy Create free account
hub / github.com/Syncplay/syncplay / sendChat

Method sendChat

syncplay/server.py:212–215  ·  view source on GitHub ↗
(self, watcher, message)

Source from the content-addressed store, hash-verified

210 self._roomManager.broadcastRoom(watcher, lambda w: w.sendControlledRoomAuthStatus(False, watcher.getName(), room._name))
211
212 def sendChat(self, watcher, message):
213 message = truncateText(message, self.maxChatMessageLength)
214 messageDict = {"message": message, "username": watcher.getName()}
215 self._roomManager.broadcastRoom(watcher, lambda w: w.sendChatMessage(messageDict))
216
217 def setReady(self, watcher, isReady, manuallyInitiated=True, username=None):
218 if username and username != watcher.getName():

Callers 1

handleChatMethod · 0.45

Calls 4

truncateTextFunction · 0.90
broadcastRoomMethod · 0.80
getNameMethod · 0.45
sendChatMessageMethod · 0.45

Tested by

no test coverage detected