1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00

editor: use status to check for being online

This commit is contained in:
Michael Vetter 2021-06-10 16:54:25 +02:00
parent 242381cfd0
commit b7914c4c6a

View File

@ -9403,9 +9403,10 @@ cmd_change_password(ProfWin* window, const char* const command, gchar** args)
gboolean gboolean
cmd_editor(ProfWin* window, const char* const command, gchar** args) cmd_editor(ProfWin* window, const char* const command, gchar** args)
{ {
xmpp_ctx_t* const ctx = connection_get_ctx(); jabber_conn_status_t conn_status = connection_get_status();
if (!ctx) {
log_debug("Editor: no connection"); if (conn_status != JABBER_CONNECTED) {
cons_show("You are currently not connected.");
return TRUE; return TRUE;
} }