mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 02:53:02 +01:00
Merge branch 'read-receipt' of https://github.com/stal888/ProjectTox-Core into pull-requests
Conflicts: testing/toxic/chat.c testing/toxic/prompt.c
This commit is contained in:
commit
57601e0c1a
2
chat.c
2
chat.c
@ -121,7 +121,7 @@ static void chat_onKey(ToxWindow *self, int key)
|
|||||||
wattroff(ctx->history, COLOR_PAIR(1));
|
wattroff(ctx->history, COLOR_PAIR(1));
|
||||||
wprintw(ctx->history, "%s\n", ctx->line);
|
wprintw(ctx->history, "%s\n", ctx->line);
|
||||||
}
|
}
|
||||||
if (m_sendmessage(ctx->friendnum, (uint8_t*) ctx->line, strlen(ctx->line)+1) < 0) {
|
if (m_sendmessage(ctx->friendnum, (uint8_t*) ctx->line, strlen(ctx->line)+1) == 0) {
|
||||||
wattron(ctx->history, COLOR_PAIR(3));
|
wattron(ctx->history, COLOR_PAIR(3));
|
||||||
wprintw(ctx->history, " * Failed to send message.\n");
|
wprintw(ctx->history, " * Failed to send message.\n");
|
||||||
wattroff(ctx->history, COLOR_PAIR(3));
|
wattroff(ctx->history, COLOR_PAIR(3));
|
||||||
|
2
prompt.c
2
prompt.c
@ -291,7 +291,7 @@ static void execute(ToxWindow *self, char *u_cmd)
|
|||||||
}
|
}
|
||||||
msg[0] = 0;
|
msg[0] = 0;
|
||||||
msg++;
|
msg++;
|
||||||
if (m_sendmessage(atoi(id), (uint8_t*) msg, strlen(msg)+1) < 0)
|
if (m_sendmessage(atoi(id), (uint8_t*) msg, strlen(msg)+1) == 0)
|
||||||
wprintw(self->window, "Error occurred while sending message.\n");
|
wprintw(self->window, "Error occurred while sending message.\n");
|
||||||
else
|
else
|
||||||
wprintw(self->window, "Message successfully sent.\n");
|
wprintw(self->window, "Message successfully sent.\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user