1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-03 03:26:45 +02:00

don't allow calls to offline friends

This commit is contained in:
Jfreegman
2014-06-23 22:02:22 -04:00
parent f324d2d34b
commit 490c80dae9
2 changed files with 6 additions and 0 deletions

View File

@ -386,6 +386,11 @@ void cmd_call(WINDOW *window, ToxWindow *self, Tox *m, int argc, char (*argv)[MA
goto on_error;
}
if (!self->stb->is_online) {
error_str = "Friend is offline.";
goto on_error;
}
ToxAvError error = toxav_call(ASettins.av, &self->call_idx, self->num, TypeAudio, 30);
if ( error != ErrorNone ) {