since the template engine doesn't do this for you, we have to evaluate the subscribe...
authorWilfried Goesgens <dothebart@citadel.org>
Mon, 22 Dec 2014 19:14:47 +0000 (20:14 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 22 Dec 2014 19:14:47 +0000 (20:14 +0100)
webcit/listsub.c

index 5d9ceb8a7b1ac6baed11707263887cdb748eb1df..64f809e522f93feba0a380c1c6dba81ebcabf5b0 100644 (file)
@@ -24,7 +24,11 @@ int Conditional_LISTSUB_EXECUTE_SUBSCRIBE(StrBuf *Target, WCTemplputParams *TP)
        StrBuf *Line;
        const char *ImpMsg;
        const StrBuf *Room, *Email, *SubType;
-       
+
+       if (strcmp(bstr("cmd"), "subscribe")) {
+               return 0;
+       }
+
        Room = sbstr("room");
        if (Room == NULL)
        {
@@ -62,7 +66,11 @@ int Conditional_LISTSUB_EXECUTE_UNSUBSCRIBE(StrBuf *Target, WCTemplputParams *TP
        StrBuf *Line;
        const char *ImpMsg;
        const StrBuf *Room, *Email;
-       
+
+       if (strcmp(bstr("cmd"), "unsubscribe")) {
+               return 0;
+       }
+
        Room = sbstr("room");
        if (Room == NULL)
        {
@@ -98,7 +106,11 @@ int Conditional_LISTSUB_EXECUTE_CONFIRM_SUBSCRIBE(StrBuf *Target, WCTemplputPara
        StrBuf *Line;
        const char *ImpMsg;
        const StrBuf *Room, *Token;
-       
+
+       if (strcmp(bstr("cmd"), "confirm")) {
+               return 0;
+       }
+
        Room = sbstr("room");
        if (Room == NULL)
        {