~ehmry/nim_tox

9c41ec2544f83267b4d4a117ac57f74e646c6920 — Emery Hemingway 10 months ago 77b8b71
Normalize API for sending messages to conferences
1 files changed, 2 insertions(+), 2 deletions(-)

M src/toxcore.nim
M src/toxcore.nim => src/toxcore.nim +2 -2
@@ 1232,7 1232,7 @@ type Err_Conference_Send_Message {.ctoxEnum.} = enum
  TOX_ERR_CONFERENCE_SEND_MESSAGE_NO_CONNECTION,
  TOX_ERR_CONFERENCE_SEND_MESSAGE_FAIL_SEND

proc send*(tox: Tox; conf: Conference; kind: MessageType; msg: string) {.
proc send*(tox: Tox; conf: Conference; msg: string; kind = TOX_MESSAGE_TYPE_NORMAL): bool {.
    tags: [IOEffect].} =
  proc conference_send_message(
    core: Core; conf: Conference;


@@ 1240,7 1240,7 @@ proc send*(tox: Tox; conf: Conference; kind: MessageType; msg: string) {.
    length: csize;
    error: ptr Err_Conference_Send_Message): bool {.ctoxProc.}
  var err = TOX_ERR_CONFERENCE_SEND_MESSAGE_OK
  discard tox.core.conference_send_message(
  result = tox.core.conference_send_message(
    conf, kind, msg, msg.len, addr err)
  ctoxAssert(TOX_ERR_CONFERENCE_SEND_MESSAGE_OK, err)