html_to_ascii() moved into libcitadel
[citadel.git] / citadel / journaling.c
index 38629ab41eff073c82f6406e0e1216d33032296e..9fc8246ea3e0478559fc8878677486d78d6d54df 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id:  $
+ * $Id$
  *
  * Message journaling functions.
  *
@@ -29,9 +29,9 @@
 #include <errno.h>
 #include <stdarg.h>
 #include <sys/stat.h>
+#include <libcitadel.h>
 #include "citadel.h"
 #include "server.h"
-#include "serv_extensions.h"
 #include "database.h"
 #include "msgbase.h"
 #include "support.h"
 #include "file_ops.h"
 #include "config.h"
 #include "control.h"
-#include "tools.h"
-#include "mime_parser.h"
-#include "html.h"
 #include "genstamp.h"
 #include "internet_addressing.h"
-#include "vcard.h"
-#include "serv_vcard.h"
+#include "serv_vcard.h"                        /* Needed for vcard_getuser and extract_inet_email_addrs */
 #include "journaling.h"
 
+#include "ctdl_module.h"
+#include "threads.h"
+
 struct jnlq *jnlq = NULL;      /* journal queue */
 
 /*
@@ -93,6 +92,14 @@ void JournalBackgroundSubmit(struct CtdlMessage *msg,
 /*
  * Convert a local user name to an internet email address for the journal
  */
+/*
+ * TODODRW: change this into a CtdlModuleDo type function that returns alternative address info
+ * for this local user. Something like CtdlModuleGoGetAddr(char *localuser, int type, char *alt_addr, size_t alt_addr_len)
+ * where type can be ADDR_EMAIL, ADDR_FIDO, ADDR_UUCP, ADDR_WEB, ADDR_POSTAL etc etc.
+ * This then begs the question of what should be returned. Is it wise to return a single char* using a comma as a
+ * delimiter? Or would it be better to return a linked list of some kind?
+ */
 void local_to_inetemail(char *inetemail, char *localuser, size_t inetemail_len) {
        struct ctdluser us;
        struct vCard *v;
@@ -126,7 +133,7 @@ void JournalRunQueueMsg(struct jnlq *jmsg) {
        static int seq = 0;
        int i;
 
-       journal_recps = validate_recipients(config.c_journal_dest);
+       journal_recps = validate_recipients(config.c_journal_dest, NULL, 0);
        if (journal_recps != NULL) {
 
                if (  (journal_recps->num_local > 0)