From: Art Cancro Date: Sun, 27 Feb 2022 17:23:21 +0000 (-0500) Subject: click on the envelope to go to the inbox X-Git-Tag: v950~6 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=19710bbd0199cdd1418a3b885a1f7ab33eb9093a click on the envelope to go to the inbox --- diff --git a/textclient/messages.c b/textclient/messages.c index 1f304041a..9ece2099d 100644 --- a/textclient/messages.c +++ b/textclient/messages.c @@ -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 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 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 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); diff --git a/webcit-ng/api.txt b/webcit-ng/api.txt index 37d90510b..d1ba7da3d 100644 --- a/webcit-ng/api.txt +++ b/webcit-ng/api.txt @@ -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 diff --git a/webcit-ng/static/index.html b/webcit-ng/static/index.html index 8952d2554..ad7ee4e59 100644 --- a/webcit-ng/static/index.html +++ b/webcit-ng/static/index.html @@ -47,7 +47,7 @@ LOADING
Not logged in.
- +