click on the envelope to go to the inbox
authorArt Cancro <ajc@citadel.org>
Sun, 27 Feb 2022 17:23:21 +0000 (12:23 -0500)
committerArt Cancro <ajc@citadel.org>
Sun, 27 Feb 2022 17:23:21 +0000 (12:23 -0500)
textclient/messages.c
webcit-ng/api.txt
webcit-ng/static/index.html

index 1f304041a2b0e3641187675acdc503cb42ecbeff..9ece2099d7a46bbcf09d2724573610d657152caa 100644 (file)
@@ -64,7 +64,7 @@ extern CtdlIPC *ipc_for_signal_handlers;      /* KLUDGE cover your eyes */
 int num_urls = 0;
 char urls[MAXURLS][SIZ];
 char imagecmd[SIZ];
-int has_images = 0;            /* Current msg has images */
+int has_images = 0;                            /* Current msg has images */
 struct parts *last_message_parts = NULL;       /* Parts from last msg */
 
 
@@ -128,8 +128,7 @@ int ka_system(char *shc) {
 /*
  * add a newline to the buffer...
  */
-void add_newline(struct cittext *textlist)
-{
+void add_newline(struct cittext *textlist) {
        struct cittext *ptr;
 
        ptr = textlist;
@@ -1072,6 +1071,10 @@ int entmsg(CtdlIPC * ipc, int is_reply,  /* nonzero if this was a <R>eply command
        int r;                  /* IPC response code */
        int subject_required = 0;
 
+       /*
+        * First, check to see if we have permission to enter a message in
+        * this room.  The server will return an error code if we can't.
+        */
        if (entmsg_ok == ENTMSG_OK_YES) {
                /* no problem, go right ahead */
        }
@@ -1100,10 +1103,6 @@ int entmsg(CtdlIPC * ipc, int is_reply,  /* nonzero if this was a <R>eply command
 
        strcpy(subject, "");
 
-       /*
-        * First, check to see if we have permission to enter a message in
-        * this room.  The server will return an error code if we can't.
-        */
        strcpy(message.recipient, "");
        strcpy(message.author, "");
        strcpy(message.subject, "");
@@ -1280,10 +1279,10 @@ int entmsg(CtdlIPC * ipc, int is_reply, /* nonzero if this was a <R>eply command
        }
 
        if (b == 1) {
-               scr_printf("*** 1 additional message has been entered " "in this room by another user.\n");
+               scr_printf("*** 1 additional message has been entered in this room by another user.\n");
        }
        else if (b > 1) {
-               scr_printf("*** %d additional messages have been entered " "in this room by other users.\n", b);
+               scr_printf("*** %d additional messages have been entered in this room by other users.\n", b);
        }
        free(message.text);
 
index 37d90510b158dccf4aaafc513cd24848c3a07c47..d1ba7da3dc521085caeefef683ef658eafc7209a 100644 (file)
@@ -11,6 +11,7 @@ GET           /ctdl/r/ROOMNAME/info.txt       Returns the room info banner for this room
 GET            /ctdl/r/ROOMNAME/msgs.all       JSON array of message list in room
 GET            /ctdl/r/ROOMNAME/msgs.new       JSON array of message list in room (new messages)
 GET            /ctdl/r/ROOMNAME/MSGNUM         Retrieve the content of an individual message
+GET            /ctdl/r/ROOMNAME/MSGNUM/json    Retrieve an individual message in a room, encapsulated in JSON
 DELETE         /ctdl/r/ROOMNAME/MSGNUM         Deletes a message from a room
 
 PUT            /ctdl/r/ROOMNAME/xxx            DAV operation to insert a new message into a room
@@ -23,7 +24,6 @@ GET           /ctdl/r/ROOMNAME/slrp           Set the "Last Read Pointer" for the room
                                                Accepted parameters:
                                                last    The number of the most recently seen message
 
-GET            /ctdl/r/ROOMNAME/MSGNUM/json    Retrieve an individual message in a room, encapsulated in JSON
 GET            /ctdl/c/info                    Returns a JSON representation of the output of an INFO server command
 POST           /ctdl/a/login                   Send it a your credentials and it will log you in
 GET            /ctdl/a/whoami
index 8952d2554547cf16c987a47f856b48a307af5d88..ad7ee4e596712e0aef7744f94d10c3c172ff36d4 100644 (file)
@@ -47,7 +47,7 @@ LOADING
                </div>
                <div class="w3-col s8 w3-bar">
                        <span id="current_user">Not logged in.</span><br>
-                       <a href="#" class="w3-bar-item w3-button"><i class="fa fa-envelope"></i></a>
+                       <a href="#" class="w3-bar-item w3-button"><i class="fa fa-envelope" onclick="javascript:gotoroom('_MAIL_');"></i></a>
                        <a href="#" class="w3-bar-item w3-button"><i class="fa fa-user"></i></a>
                        <a href="#" class="w3-bar-item w3-button"><i class="fa fa-cog"></i></a>
                </div>