about summary refs log tree commit diff stats
path: root/src/command
diff options
context:
space:
mode:
Diffstat (limited to 'src/command')
-rw-r--r--src/command/cmd_ac.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/command/cmd_ac.c b/src/command/cmd_ac.c
index 80abcf36..31156e15 100644
--- a/src/command/cmd_ac.c
+++ b/src/command/cmd_ac.c
@@ -4148,7 +4148,7 @@ _lastactivity_autocomplete(ProfWin* window, const char* const input, gboolean pr
     char* result = NULL;
 
     result = autocomplete_param_with_ac(input, "/lastactivity", status_ac, TRUE, previous);
-    if (result) {
+    if (!result) {
         return result;
     }
 
@@ -4157,15 +4157,10 @@ _lastactivity_autocomplete(ProfWin* window, const char* const input, gboolean pr
     if (conn_status == JABBER_CONNECTED) {
 
         result = autocomplete_param_with_func(input, "/lastactivity set", prefs_autocomplete_boolean_choice, previous, NULL);
-        if (result) {
-            return result;
-        }
-
-        result = autocomplete_param_with_func(input, "/lastactivity get", roster_barejid_autocomplete, previous, NULL);
-        if (result) {
-            return result;
+        if (!result) {
+            result = autocomplete_param_with_func(input, "/lastactivity get", roster_barejid_autocomplete, previous, NULL);
         }
     }
 
-    return NULL;
+    return result;
 }