citadel.git
4 months agomoar skeleton
Art Cancro [Fri, 22 Dec 2023 16:54:16 +0000 (11:54 -0500)]
moar skeleton

4 months agowebcit.h: regenerated function prototypes using cproto
Art Cancro [Fri, 22 Dec 2023 16:39:42 +0000 (11:39 -0500)]
webcit.h: regenerated function prototypes using cproto

4 months agocalendar_functions.c: added skeleton
Art Cancro [Fri, 22 Dec 2023 16:24:19 +0000 (11:24 -0500)]
calendar_functions.c: added skeleton

4 months agoroom_functions.c: get_msglist() now returns Array
Art Cancro [Fri, 22 Dec 2023 16:10:14 +0000 (11:10 -0500)]
room_functions.c: get_msglist() now returns Array

Previously it returned a long* which contained a list of longs.
Assembling this required the same allocation logic used in our
array class, so now we're just using the array class.

4 months agoChanged the arrangement of bytes in the universe
Art Cancro [Fri, 22 Dec 2023 15:52:57 +0000 (10:52 -0500)]
Changed the arrangement of bytes in the universe

4 months agoUpdated copyright date in files where git blame shows 2023 mods
Art Cancro [Thu, 21 Dec 2023 21:27:31 +0000 (16:27 -0500)]
Updated copyright date in files where git blame shows 2023 mods

4 months agoAdded stub renderers for Calendar and Contacts rooms
Art Cancro [Wed, 20 Dec 2023 17:13:03 +0000 (12:13 -0500)]
Added stub renderers for Calendar and Contacts rooms

4 months agoviews.js: convert strings to template literals
Art Cancro [Wed, 20 Dec 2023 16:51:12 +0000 (11:51 -0500)]
views.js: convert strings to template literals

4 months agoFound a place where 1TBS was not used, and fixed it.
Art Cancro [Wed, 20 Dec 2023 15:50:53 +0000 (10:50 -0500)]
Found a place where 1TBS was not used, and fixed it.

1TBS is important.  People who do not use 1TBS are literally Hitler.

4 months agoMore template literals.
Art Cancro [Wed, 20 Dec 2023 04:15:10 +0000 (23:15 -0500)]
More template literals.

4 months agoI really like template literals.
Art Cancro [Wed, 20 Dec 2023 04:12:38 +0000 (23:12 -0500)]
I really like template literals.

And now that I know how to use them, I will be using more of them.

4 months agoTuned up the CSS on more banner buttons
Art Cancro [Wed, 20 Dec 2023 04:07:00 +0000 (23:07 -0500)]
Tuned up the CSS on more banner buttons

4 months agoMake the font sizes less cartoonish at extreme viewport sizes
Art Cancro [Tue, 19 Dec 2023 22:09:21 +0000 (17:09 -0500)]
Make the font sizes less cartoonish at extreme viewport sizes

4 months agoWhen forwarding an email, pre-load its attachments.
Art Cancro [Mon, 18 Dec 2023 19:26:30 +0000 (14:26 -0500)]
When forwarding an email, pre-load its attachments.

This completes the effort to server-side-preload the attachments from
the original message.  They appear as attachments in the forwarded copy
of the message in the composer, using the same API.  A lot of effort
went into making the 'attach' and 'forward attachments' functions DRY
with respect to each other.

4 months agoserv_smtpclient.c: style cleanup
Art Cancro [Mon, 18 Dec 2023 04:39:00 +0000 (23:39 -0500)]
serv_smtpclient.c: style cleanup

Mostly just made stuff look nice in 132 columns

5 months agoupload.c: completed the code to reload attachments.
Art Cancro [Thu, 14 Dec 2023 16:30:52 +0000 (11:30 -0500)]
upload.c: completed the code to reload attachments.

Now we have an API call to load attachments from existing messages
instead of from the browser.  This is the server side API.  Still need
to integrate it into the client.

5 months agoview_mail.js: don't list attachments in a quote or forward
Art Cancro [Thu, 14 Dec 2023 15:29:02 +0000 (10:29 -0500)]
view_mail.js: don't list attachments in a quote or forward

5 months agoupload.c: skeleton code for load_attachments_from_message()
Art Cancro [Wed, 13 Dec 2023 22:52:18 +0000 (17:52 -0500)]
upload.c: skeleton code for load_attachments_from_message()

5 months agouploads.c: made the syslog less verbose
Art Cancro [Wed, 13 Dec 2023 22:25:43 +0000 (17:25 -0500)]
uploads.c: made the syslog less verbose

Also documented the JSON return values in api.txt

5 months agoview_mail.js: more improvements to mail forwarding
Art Cancro [Wed, 13 Dec 2023 03:15:17 +0000 (22:15 -0500)]
view_mail.js: more improvements to mail forwarding

 * "Fwd:" instead of "Re:"
 * The "--- forwarded message ---" po string is carried over from webcit-classic
 * Make the editor aware that a message is being forwarded
 * TODO: load attachments from the message being forwarded

5 months agoKeep the "Attachments:" button updated.
Art Cancro [Wed, 13 Dec 2023 02:21:19 +0000 (21:21 -0500)]
Keep the "Attachments:" button updated.

When an attachment is added or removed using the upload window,
also update the count in the button.

5 months ago"Number of attachments" div name is now variable.
Art Cancro [Wed, 13 Dec 2023 02:10:57 +0000 (21:10 -0500)]
"Number of attachments" div name is now variable.

Actually it's an array of strings, and the upload module will
update every div stored in there with the attachment count.

5 months agoview_mail.js: remove upload from local array when deleted.
Art Cancro [Thu, 7 Dec 2023 23:51:32 +0000 (18:51 -0500)]
view_mail.js: remove upload from local array when deleted.

This makes the Attachments: counter decrement correctly.

5 months agoview_mail.js: removed the is_quoted parameter.
Art Cancro [Thu, 7 Dec 2023 20:29:18 +0000 (15:29 -0500)]
view_mail.js: removed the is_quoted parameter.

is_quoted is now determined by whether quoted_msgnum is nonzero.
In mail, we always pull quote for replies.

5 months agoview_mail.js: fixed handling of references field
Art Cancro [Wed, 6 Dec 2023 21:20:40 +0000 (16:20 -0500)]
view_mail.js: fixed handling of references field

5 months agoConverting recipient arrays to recipient strings:
Art Cancro [Thu, 30 Nov 2023 19:07:12 +0000 (09:07 -1000)]
Converting recipient arrays to recipient strings:

Fixed the dedupe so it works before now, and
also made it DRY.

5 months agodatabaselayout.md: updated to remove networking
Art Cancro [Thu, 30 Nov 2023 18:20:09 +0000 (08:20 -1000)]
databaselayout.md: updated to remove networking

5 months agoFixing the parameters sent to the mail composer.
Art Cancro [Wed, 29 Nov 2023 21:32:02 +0000 (11:32 -1000)]
Fixing the parameters sent to the mail composer.

Reply/ReplyAll/Forward need some things that are not strings
and the source arrays seem to still be in scope, so we go with
that.  Need to tune this up some more.  Some things are still
missing, such as the references and reply msgnum.

5 months agoview_mail.js: make the Forward button appear.
Art Cancro [Wed, 29 Nov 2023 04:52:36 +0000 (18:52 -1000)]
view_mail.js: make the Forward button appear.

Needs a lot of work.  Currently it is just a reply with no addressees filled in.
It needs to not quote the message, and carry over the attachments.

5 months ago"make cc/bcc visible" now makes BOTH visible.
Art Cancro [Wed, 29 Nov 2023 04:31:41 +0000 (18:31 -1000)]
"make cc/bcc visible" now makes BOTH visible.

Somewhere along the line it lost CC and only showed BCC.

5 months agoserv_extensions.c: style cleanup from 30,000 feet
Art Cancro [Mon, 27 Nov 2023 21:43:38 +0000 (11:43 -1000)]
serv_extensions.c: style cleanup from 30,000 feet

No, I'm not takin a broader view of the code.  I'm actually on an airplane.

5 months agoFocus on "To:" for new messages, body for replies.
Art Cancro [Tue, 21 Nov 2023 23:26:46 +0000 (18:26 -0500)]
Focus on "To:" for new messages, body for replies.

5 months agomail view: focus the cursor in the correct place when composing
Art Cancro [Tue, 21 Nov 2023 23:22:57 +0000 (18:22 -0500)]
mail view: focus the cursor in the correct place when composing

5 months agoRestored the gap before the "Hi From Stu" sound.
Art Cancro [Tue, 21 Nov 2023 22:55:03 +0000 (17:55 -0500)]
Restored the gap before the "Hi From Stu" sound.

Now I see why he put it there in the first place.
Some players (including the one in my browser) cut off
the first bit of sound.

5 months agoOnly attempt to insert quote when replying to mail.
Art Cancro [Tue, 21 Nov 2023 22:52:41 +0000 (17:52 -0500)]
Only attempt to insert quote when replying to mail.

Also do that after rendering the attachments window.
Doing it before doesn't work.
I don't know why.

5 months agoRemoved temporary diagnostic output
Art Cancro [Tue, 21 Nov 2023 14:41:18 +0000 (09:41 -0500)]
Removed temporary diagnostic output

5 months agoupload.js: when removing an attachment, delete the div
Art Cancro [Tue, 21 Nov 2023 00:00:13 +0000 (19:00 -0500)]
upload.js: when removing an attachment, delete the div

This is handled the usual way, when we get a successful response from
the HTTP DELETE method, it triggers the removal of the list element
showing the attachment.

5 months agoWhen a mail compose is canceled, flush all uploads.
Art Cancro [Sun, 19 Nov 2023 18:39:12 +0000 (13:39 -0500)]
When a mail compose is canceled, flush all uploads.

Most of this was already in place.  We now just run through our upload
list and do an async DELETE operation for each one.

6 months agoupload.js: moved the delete-an-attachment skeleton code to its own function
Art Cancro [Thu, 9 Nov 2023 23:44:52 +0000 (13:44 -1000)]
upload.js: moved the delete-an-attachment skeleton code to its own function

6 months agoFixed the MIME boundary after the message text.
Art Cancro [Mon, 6 Nov 2023 22:57:44 +0000 (17:57 -0500)]
Fixed the MIME boundary after the message text.

It had the trailing dashes in it, so it was getting interpreted as the end of the message.
Now that's corrected and the parsers of the world are happy.
Also, we eliminated the double-nesting thing, and everything is hunky dory now.

6 months agoQuoted-printable encode HTML messages on the WebCit Server side.
Art Cancro [Mon, 6 Nov 2023 22:51:13 +0000 (17:51 -0500)]
Quoted-printable encode HTML messages on the WebCit Server side.

This allows us to do multipart with attachments without nested encoding.

6 months agowebcit-ng: fixed the way HTTP uploads are fed into the MIME Parser.
Art Cancro [Mon, 6 Nov 2023 21:56:55 +0000 (16:56 -0500)]
webcit-ng: fixed the way HTTP uploads are fed into the MIME Parser.

mime_parser() expects HEADERS+CONTENT but our h.request_body only contains CONTENT.
The fix: our transaction struct now has h.request_body_with_synth_headers that
begins with a synthetic Content-Type: header followed by a blank line and then the
request body.  h.request_body is now just a pointer into that buffer, starting at
the position where the actual body begins.

This gives us the ability to supply the body with or without headers, without having
to make two copies of it.

6 months agoconsidering nuclear weapons
Art Cancro [Mon, 6 Nov 2023 16:57:37 +0000 (11:57 -0500)]
considering nuclear weapons

6 months agoLooks like I need to remove some optimization cancer from mime_parser.c, but first...
Art Cancro [Mon, 6 Nov 2023 16:48:36 +0000 (11:48 -0500)]
Looks like I need to remove some optimization cancer from mime_parser.c, but first, a bit of style cleanup.

6 months agoProgress on upload
Art Cancro [Mon, 6 Nov 2023 16:30:08 +0000 (11:30 -0500)]
Progress on upload

6 months agoroom_functions.c: remove diagnostic hex dump of recipient field
Art Cancro [Fri, 3 Nov 2023 20:34:07 +0000 (16:34 -0400)]
room_functions.c: remove diagnostic hex dump of recipient field

6 months agojson.c: encode JSON strings the correct way (RFC 7159 section 7).
Art Cancro [Fri, 3 Nov 2023 04:13:46 +0000 (19:13 -0900)]
json.c: encode JSON strings the correct way (RFC 7159 section 7).

The previous code used the JavaScript encoder from the stringbuf library, which
is *not* the same encoding.  Now it doesn't make the browser's parser barf when
it encounters a control character.

6 months agoWar on old style continues.
Art Cancro [Fri, 3 Nov 2023 02:42:28 +0000 (17:42 -0900)]
War on old style continues.

I really ought to be writing some real code tonight.  But I get into a file and I see
old style and I want to make it clean and shiny and it's easier than the kind of heavy
brain work I should be doing.  When faced with a heavy think, I dawdle for a long time
before I really get started.  I've done this since I was a child.

6 months agostringbuf.c: chipped away at style modernization
Art Cancro [Mon, 30 Oct 2023 18:05:20 +0000 (09:05 -0900)]
stringbuf.c: chipped away at style modernization

This is a big one with a lot of outdated style in it.
Folded lines which were >80 columns but <132 columns.
Add {} braces to single-line conditional blocks.
Replaced C89 comments with C99 comments.

6 months agovcard.c: style cleanup
Art Cancro [Mon, 30 Oct 2023 17:49:24 +0000 (08:49 -0900)]
vcard.c: style cleanup

6 months agoChanged some C89 style comments to C99 style.
Art Cancro [Fri, 27 Oct 2023 20:39:54 +0000 (11:39 -0900)]
Changed some C89 style comments to C99 style.

This is what I do when I'm slacking off and should be doing something useful.

6 months agoremoved an unused function
Art Cancro [Fri, 27 Oct 2023 17:57:43 +0000 (08:57 -0900)]
removed an unused function

6 months agoSaving my place.
Art Cancro [Sat, 21 Oct 2023 16:55:17 +0000 (07:55 -0900)]
Saving my place.

Note to self: there is something in the mailbox of admin@dev that is
causing the renderer to fail and the javascript console emits unhelpful
messages.

6 months agoloadtest: counters row offset from banner is definable
Art Cancro [Mon, 16 Oct 2023 20:22:52 +0000 (20:22 +0000)]
loadtest: counters row offset from banner is definable

6 months agoloadtest: counter position is now derived from thread id, not socket number.
Art Cancro [Mon, 16 Oct 2023 19:53:17 +0000 (19:53 +0000)]
loadtest: counter position is now derived from thread id, not socket number.

This is what I was actually trying to accomplish a couple of commits ago.  I made
a race condition and that's why it was malfunctioning.  This way is better and it
works.  It also once shot a man in Reno just to watch him die.

6 months agoloadtest: paint the screen in a separate pass
Art Cancro [Mon, 16 Oct 2023 19:34:59 +0000 (19:34 +0000)]
loadtest: paint the screen in a separate pass

6 months agotried some random cosmetic stuff and removed it
Art Cancro [Mon, 16 Oct 2023 16:14:27 +0000 (12:14 -0400)]
tried some random cosmetic stuff and removed it

6 months agoRevert "loadtest: change display"
Art Cancro [Mon, 16 Oct 2023 16:08:39 +0000 (12:08 -0400)]
Revert "loadtest: change display"

This reverts commit fdd4f3034903e50395e72acf74636e4cb12c2291.

6 months agoloadtest: change display
Art Cancro [Mon, 16 Oct 2023 15:59:58 +0000 (06:59 -0900)]
loadtest: change display

7 months agoserver/housekeeping.c: fix a small compiler warning
Art Cancro [Fri, 13 Oct 2023 15:45:30 +0000 (06:45 -0900)]
server/housekeeping.c: fix a small compiler warning

7 months agoMore progress on attaching attachments
Art Cancro [Fri, 13 Oct 2023 15:32:40 +0000 (11:32 -0400)]
More progress on attaching attachments

7 months agomessages.c: inching towards saving the attachments
Art Cancro [Wed, 11 Oct 2023 22:55:08 +0000 (18:55 -0400)]
messages.c: inching towards saving the attachments

7 months agoDon't try to destroy the upload window if it doesn't exist.
Art Cancro [Wed, 11 Oct 2023 22:44:05 +0000 (18:44 -0400)]
Don't try to destroy the upload window if it doesn't exist.

7 months agoGot multipart/mixed being transmitted
Art Cancro [Wed, 11 Oct 2023 22:36:29 +0000 (18:36 -0400)]
Got multipart/mixed being transmitted

7 months agodeactivate_uploads() hides the window.
Art Cancro [Wed, 11 Oct 2023 21:58:46 +0000 (17:58 -0400)]
deactivate_uploads() hides the window.

7 months agobroken: attachments window cannot be a child of the editor body
Art Cancro [Wed, 11 Oct 2023 03:18:07 +0000 (23:18 -0400)]
broken: attachments window cannot be a child of the editor body

It causes the attachments window to be saved as part of the message text.
Oof.

7 months agoupload: reduce attachment identifiers to 9 characters.
Art Cancro [Wed, 11 Oct 2023 02:37:48 +0000 (22:37 -0400)]
upload: reduce attachment identifiers to 9 characters.

Also switched from a unicode X to a fontawesome rounded-X for the
'remove attachment' button.  The unicode one was too big.

7 months agomove struct uploaded_file to webcit.h
Art Cancro [Tue, 10 Oct 2023 22:56:09 +0000 (18:56 -0400)]
move struct uploaded_file to webcit.h

7 months agoloadtest: small file cleanup
Art Cancro [Fri, 6 Oct 2023 03:31:54 +0000 (23:31 -0400)]
loadtest: small file cleanup

7 months agoupload DELETE method
Art Cancro [Fri, 6 Oct 2023 03:20:27 +0000 (23:20 -0400)]
upload DELETE method

7 months agoVarious operations in the /ctdl/p/ hierarchy to handle uploading of attachments
Art Cancro [Fri, 6 Oct 2023 03:10:24 +0000 (23:10 -0400)]
Various operations in the /ctdl/p/ hierarchy to handle uploading of attachments

7 months ago❌ marks the spot
Art Cancro [Wed, 4 Oct 2023 21:34:10 +0000 (17:34 -0400)]
❌ marks the spot

7 months agouploads
root [Wed, 4 Oct 2023 18:55:26 +0000 (14:55 -0400)]
uploads

7 months agoupload.c: hold uploads in temporary file handles
root [Wed, 4 Oct 2023 16:49:34 +0000 (12:49 -0400)]
upload.c: hold uploads in temporary file handles

7 months agoupload: change REST path from /ctdl/a/upload/ to /ctdl/p/
Art Cancro [Tue, 3 Oct 2023 18:35:01 +0000 (14:35 -0400)]
upload: change REST path from /ctdl/a/upload/ to /ctdl/p/

7 months agoapi.txt: updated
Art Cancro [Tue, 3 Oct 2023 18:26:11 +0000 (14:26 -0400)]
api.txt: updated

7 months agolibcitadel/configure.in: renamed to configure.ac
Art Cancro [Tue, 3 Oct 2023 17:50:06 +0000 (13:50 -0400)]
libcitadel/configure.in: renamed to configure.ac

7 months agoupload.c: rename "tempfilename" to "ref"
Art Cancro [Sat, 30 Sep 2023 04:55:54 +0000 (00:55 -0400)]
upload.c: rename "tempfilename" to "ref"

This will hopefully discourage people from trying to play stupid tricks
involving guessing the filename and trying to escape the containment.

7 months agoupload.js: moved these functions into own file.
Art Cancro [Sat, 30 Sep 2023 04:47:08 +0000 (00:47 -0400)]
upload.js: moved these functions into own file.

Good clean separation of functions.
This should allow us to handle uploads in lots of different places
in the system.

7 months agoarray.c: minor changes to comments
Art Cancro [Sat, 30 Sep 2023 04:27:35 +0000 (00:27 -0400)]
array.c: minor changes to comments

7 months agoRelease version 996 generated by do-release.sh v996
Art Cancro [Fri, 29 Sep 2023 02:19:43 +0000 (22:19 -0400)]
Release version 996 generated by do-release.sh

7 months agoAdditional checks to keep zero-length messages from crashing the indexer.
Art Cancro [Fri, 29 Sep 2023 02:14:24 +0000 (22:14 -0400)]
Additional checks to keep zero-length messages from crashing the indexer.

7 months agouploads: return uploaded file info to caller
Art Cancro [Wed, 27 Sep 2023 17:48:29 +0000 (13:48 -0400)]
uploads: return uploaded file info to caller

7 months agoupload.c: more progress on returning values
Art Cancro [Wed, 27 Sep 2023 15:29:16 +0000 (11:29 -0400)]
upload.c: more progress on returning values

7 months agodo not require autoconf 2.71 wtf
Art Cancro [Wed, 27 Sep 2023 04:21:39 +0000 (00:21 -0400)]
do not require autoconf 2.71 wtf

7 months agoRelease version 995 generated by do-release.sh v995
Art Cancro [Wed, 27 Sep 2023 03:59:55 +0000 (23:59 -0400)]
Release version 995 generated by do-release.sh

7 months agoserv_fulltext: don't try to index a null message
Art Cancro [Wed, 27 Sep 2023 03:59:43 +0000 (23:59 -0400)]
serv_fulltext: don't try to index a null message

7 months agotextclient: makefile no longer leaves behind test compiles
Art Cancro [Wed, 27 Sep 2023 03:49:53 +0000 (23:49 -0400)]
textclient: makefile no longer leaves behind test compiles

7 months agoupload.c: write uploaded data to a temp file
Art Cancro [Wed, 27 Sep 2023 03:44:05 +0000 (23:44 -0400)]
upload.c: write uploaded data to a temp file

7 months agoview_mail.js: throbber and "Processing dropped files..." message appears
Art Cancro [Tue, 26 Sep 2023 04:13:35 +0000 (00:13 -0400)]
view_mail.js: throbber and "Processing dropped files..." message appears

"Processing dropped files..." is not exactly the right message because
the upload message might have been clicked, but I don't want to throw
away the translations of that message.

Anyway, it's really cool, they appear in the list, and go away when the
uploads are complete.

7 months agoview_mail.js: make the function names more consistent with webcit
Art Cancro [Tue, 26 Sep 2023 03:47:52 +0000 (23:47 -0400)]
view_mail.js: make the function names more consistent with webcit

(They were previously the same names used in the example, natch)
Also we're incrementing num_attachments

7 months agoSimplify the upload dialog.
Art Cancro [Tue, 26 Sep 2023 03:35:17 +0000 (23:35 -0400)]
Simplify the upload dialog.

Reduce the number of divs and make it more generic.  Allow the upload dialog to
be attached to any parent div.  Make the dialog appear automatically when a file
is dragged into the parent div.

7 months agoview_mail.js: move upload dialog from ctdl_big_modal to ctdl-upload
Art Cancro [Tue, 26 Sep 2023 02:44:10 +0000 (22:44 -0400)]
view_mail.js: move upload dialog from ctdl_big_modal to ctdl-upload

Uploads now have their own div in their own separate modal.
This is, of course, because I am trying to loosely couple the uploader so
that it can be attached to other parts of the system when needed.

Also I realized that my div names are ctdl-not ctdl_consistent with each other.
Trying to fix that.

7 months agoupload.c: stub function for accepting uploads
Art Cancro [Tue, 26 Sep 2023 02:13:59 +0000 (22:13 -0400)]
upload.c: stub function for accepting uploads

7 months agoview_mail.js: more progress on upload dialog
Art Cancro [Mon, 25 Sep 2023 14:57:34 +0000 (10:57 -0400)]
view_mail.js: more progress on upload dialog

7 months agoImproving my template-literal-fu
Art Cancro [Sun, 24 Sep 2023 21:07:18 +0000 (17:07 -0400)]
Improving my template-literal-fu

7 months agoview_mail.js: convert ugly syntax to heredocs
Art Cancro [Sun, 24 Sep 2023 21:00:37 +0000 (17:00 -0400)]
view_mail.js: convert ugly syntax to heredocs

7 months agoClose attachments window on Cancel
Art Cancro [Sun, 24 Sep 2023 19:38:48 +0000 (15:38 -0400)]
Close attachments window on Cancel

7 months agoview_mail.js: show/hide attachments screen, added title bar style and close button
Art Cancro [Sat, 23 Sep 2023 20:28:05 +0000 (16:28 -0400)]
view_mail.js: show/hide attachments screen, added title bar style and close button

7 months agoloadtest: use a random password
Art Cancro [Sat, 23 Sep 2023 18:30:57 +0000 (14:30 -0400)]
loadtest: use a random password