- StrBuf *TheMessage = NewStrBuf();
- StrBufAppendPrintf(TheMessage,
- "Content-type: text/html\n\n"
- "\n\n"
- "<html><head></head><body>"
- );
+ // check the use table
+ StrBuf *u = NewStrBuf();
+ StrBufAppendPrintf(u, "rss/%s", r->item_id);
+ time_t already_seen = CheckIfAlreadySeen("rss", u, time(NULL), 604800, eUpdate, 0, 0);
+ FreeStrBuf(&u);
+
+ if (already_seen == 0) {
+
+ // Compose the message text
+ StrBuf *TheMessage = NewStrBuf();
+ StrBufAppendPrintf(TheMessage,
+ "Content-type: text/html\n\n"
+ "\n\n"
+ "<html><head></head><body>"
+ );
+
+ if (r->description != NULL) {
+ StrBufAppendPrintf(TheMessage, "%s<br><br>\r\n", r->description);
+ free(r->description);
+ r->description = NULL;
+ }
+
+ if (r->link != NULL) {
+ StrBufAppendPrintf(TheMessage, "<a href=\"%s\">%s</a>\r\n", r->link, r->link);
+ free(r->link);
+ r->link = NULL;
+ }