Handle display of local and nonlocal messages correctly in text client
[citadel.git] / textclient / messages.c
index 731854b3a69d6c3d3c870f7b28a83aae852436b1..447c3922567378a14473de3596961cc99c002183 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Text client functions for reading and writing of messages
  *
- * Copyright (c) 1987-2019 by the citadel.org team
+ * Copyright (c) 1987-2020 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 3.
@@ -410,7 +410,6 @@ int read_message(CtdlIPC *ipc,
        char ch;
        int linelen;
        int final_line_is_blank = 0;
-
        has_images = 0;
 
        sigcaught = 0;
@@ -500,7 +499,7 @@ int read_message(CtdlIPC *ipc,
                strftime(now, sizeof now, "%F %R", &thetime);
                if (dest) {
                        fprintf(dest, "%s from %s ", now, message->author);
-                       if (!IsEmptyStr(message->email)) {
+                       if (!message->is_local) {
                                fprintf(dest, "<%s> ", message->email);
                        }
                }
@@ -511,7 +510,7 @@ int read_message(CtdlIPC *ipc,
                        scr_printf("from ");
                        color(BRIGHT_CYAN);
                        scr_printf("%s ", message->author);
-                       if (!IsEmptyStr(message->email)) {
+                       if (!message->is_local) {
                                color(DIM_WHITE);
                                scr_printf("<");
                                color(BRIGHT_BLUE);