* Updated render_MIME_ICS() to do the right thing if the calendar attachment happens...
authorArt Cancro <ajc@citadel.org>
Sun, 11 Jan 2009 03:56:02 +0000 (03:56 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 11 Jan 2009 03:56:02 +0000 (03:56 +0000)
webcit/messages.c
webcit/msg_renderers.c

index 96510d1883e2bd04b1a7db12da708306b8b90e8b..3fce730f34356a3d1a5063045030cdf6b02fa608 100644 (file)
@@ -1574,10 +1574,8 @@ void MimeLoadData(wc_mime_attachment *Mime)
        char buf[SIZ];
        off_t bytes;
 /* TODO: is there a chance the contenttype is different  to the one we know?    */
-       lprintf(9, "< DLAT %ld|%s\n", Mime->msgnum, ChrPtr(Mime->PartNum));     // FIXME temporary, remove
        serv_printf("DLAT %ld|%s", Mime->msgnum, ChrPtr(Mime->PartNum));
        serv_getln(buf, sizeof buf);
-       lprintf(9, "> %s\n", buf);                                              // FIXME temporary, remove
        if (buf[0] == '6') {
                bytes = extract_long(&buf[4], 0);
 
index 450e66889137ce3376a363ced50d7aaf30efbea1..c8f367627aaaeb326a8a739a5551c1d1ea9e3194 100644 (file)
@@ -475,9 +475,12 @@ void render_MIME_VCard(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *FoundC
        }
 
 }
+
 void render_MIME_ICS(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *FoundCharset)
 {
-       MimeLoadData(Mime);
+       if (StrLength(Mime->Data) == 0) {
+               MimeLoadData(Mime);
+       }
        if (StrLength(Mime->Data) > 0) {
                cal_process_attachment(Mime);
        }
@@ -855,12 +858,13 @@ void render_MAIL_text_plain(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *F
 void render_MAIL_html(wc_mime_attachment *Mime, StrBuf *RawData, StrBuf *FoundCharset)
 {
        StrBuf *Buf;
-       /* HTML is fun, but we've got to strip it first */
+
        if (StrLength(Mime->Data) == 0)
                return;
 
        Buf = NewStrBufPlain(NULL, StrLength(Mime->Data));
 
+       /* HTML is fun, but we've got to strip it first */
        output_html(ChrPtr(Mime->Charset), 
                    (WC->wc_view == VIEW_WIKI ? 1 : 0), 
                    StrToi(Mime->PartNum),