Add new setting to disable posting of notification messages to file rooms.
[citadel] / citadel / modules / ctdlproto / serv_file.c
index 50661c7..8a3bd5c 100644 (file)
@@ -557,14 +557,16 @@ void cmd_ucls(char *cmd)
                        fclose(fp);
                }
 
-               /* put together an upload notice */
-               snprintf(upload_notice, sizeof upload_notice,
-                       "NEW UPLOAD: '%s'\n %s\n%s\n",
-                        CC->upl_file, 
-                        CC->upl_comment, 
-                        CC->upl_mimetype);
-               quickie_message(CC->curr_user, NULL, NULL, CC->room.QRname,
-                               upload_notice, 0, NULL);
+               if ((CC->room.QRflags2 & QR2_NOUPLMSG) == 0) {
+                       /* put together an upload notice */
+                       snprintf(upload_notice, sizeof upload_notice,
+                                "NEW UPLOAD: '%s'\n %s\n%s\n",
+                                CC->upl_file, 
+                                CC->upl_comment, 
+                                CC->upl_mimetype);
+                       quickie_message(CC->curr_user, NULL, NULL, CC->room.QRname,
+                                       upload_notice, 0, NULL);
+               }
        } else {
                abort_upl(CC);
                cprintf("%d File '%s' aborted.\n", CIT_OK, CC->upl_path);