MCPcopy Create free account
hub / github.com/antirez/freakwan / send

Method send

telegram.py:254–260  ·  view source on GitHub ↗
(self,chat_id,text,glue=False)

Source from the content-addressed store, hash-verified

252 # If 'glue' is True, the new text will be glued to the old pending
253 # message up to 2k, in order to reduce the API back-and-forth.
254 def send(self,chat_id,text,glue=False):
255 if glue and len(self.outgoing) > 0 and \
256 len(self.outgoing[0]["text"])+len(text)+1 < 2048:
257 self.outgoing[0]["text"] += "\n"
258 self.outgoing[0]["text"] += text
259 return
260 self.outgoing = [{"chat_id":chat_id, "text":text}]+self.outgoing
261
262 # This is just a utility method that can be used in order to wait
263 # for the WiFi network to be connected.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected