otrl_message_fragment_and_send — Send a message to the network, fragmenting it as necessary
string otrl_message_fragment_and_send( | (ops, opdata), | |
context, | ||
message, | ||
frag_policy) ; |
tuple (ops, opdata)
;ConnContext context
;string message
;OtrlFragmentPolicy frag_policy
;
Send a message
to the network. The message
will be fragmented as requested by
and sent via ops
->max_message_size(opdata=opdata
, context=context
)
. If ops
->inject_message(opdata=opdata
, accountname=context
.accountname
, protocol=context
.protocol
, recipient=context
.username
, message=message
)frag_policy
is not OTRL_FRAGMENT_SEND_ALL
, the respective fragment is returned and MUST be sended via the messengers plugin interface (or similar).
If an error occures, it raises an Exception with the attributes errno
(containing a numeric gcry error code), os_errno
(containing an OS errno, if possible) and strerror
(containing a string describing the error).
![]() | Caution |
---|---|
You MUST NOT send the message in plaintext if an exception was raised or |