Overview
Comment: | Add support for VIP-posting |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
46949449f3f69fb0cf2229d241ef075b |
User & Date: | zge on 2022-01-22 18:27:00 |
Other Links: | branch diff | manifest | tags |
Context
2022-01-22
| ||
18:49 | Always kill HTTP response buffer after processing it check-in: 67d30a2317 user: zge tags: master, trunk | |
18:27 | Add support for VIP-posting check-in: 46949449f3 user: zge tags: master, trunk | |
18:12 | Add sbbs-open-externally command check-in: 92c5d47565 user: philip tags: master, trunk | |
Changes
Modified sbbs.el from [187923b54c] to [a4c9b26bff].
649 649 (interactive) 650 650 (when (search-backward-regexp "\\(\\*\\*\\|==\\|__\\|~~\\)" nil t) 651 651 (looking-at (concat "\\(" (regexp-quote (match-string 1)) "\\).*?" 652 652 "\\(" (regexp-quote (match-string 1)) "\\)")) 653 653 (replace-match "" nil nil nil 2) 654 654 (replace-match "" nil nil nil 1))) 655 655 656 -(defun sbbs-compose-create () 657 - "Upload response or thread to board." 658 - (interactive) 656 +(defun sbbs-compose-create (vip) 657 + "Upload response or thread to board. 658 +If VIP is non-nil (or when invoked with a prefix argument), mark 659 +the post as \"VIP\", ie. don't bump the thread." 660 + (interactive "P") 661 + (when (and vip sbbs--thread-id) 662 + (user-error "A new thread cannot be VIP")) 659 663 (let ((board sbbs--board) 660 664 (url-request-method "POST") 661 665 (url-request-extra-headers 662 666 '(("Content-Type" . "application/x-www-form-urlencoded"))) 663 667 (url-request-data 664 668 (url-build-query-string 665 669 `((epistula ,(buffer-string)) 666 670 (ornamentum "") (name "") (message "") 667 671 (frontpage ,(if sbbs--thread-id "true" "false")) 672 + (vip ,(if vip "true" "false")) 668 673 . ,(and (not sbbs--thread-id) 669 674 `((titulus ,(read-string "Headline: "))))))) 670 675 (url (if sbbs--thread-id 671 676 (sbbs--board-url (format "%d/post" sbbs--thread-id)) 672 677 (sbbs--board-url "/post")))) 673 678 (url-retrieve url (lambda (status buf) 674 679 (if (plist-get status :error)