sbbs.el

Diff
Login

Differences From Artifact [d00835b8b8]:

To Artifact [bf2e481917]:


696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
    (replace-match "" nil nil nil 1)))

(defun sbbs-compose-create (vip)
  "Upload response or thread to board.
If VIP is non-nil (or when invoked with a prefix argument), mark
the post as \"VIP\", ie. don't bump the thread."
  (interactive "P")
  (when (and vip sbbs--thread-id)
    (user-error "A new thread cannot be VIP"))
  (let ((board sbbs--board)
        (url-request-method "POST")
        (url-request-extra-headers
         '(("Content-Type" . "application/x-www-form-urlencoded")))
        (url-request-data
         (url-build-query-string
          `((epistula ,(buffer-string))
            (ornamentum "") (name "") (message "")
            (frontpage ,(if sbbs--thread-id "true" "false"))
            (vip ,(if vip "true" "false"))
            . ,(and (not sbbs--thread-id)
                    `((titulus ,(read-string "Headline: ")))))))
        (url (if sbbs--thread-id
                 (sbbs--board-url (format "%d/post" sbbs--thread-id))
               (sbbs--board-url "/post"))))
    (url-retrieve url (lambda (status buf)
                        (if (plist-get status :error)







|










|







696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
    (replace-match "" nil nil nil 1)))

(defun sbbs-compose-create (vip)
  "Upload response or thread to board.
If VIP is non-nil (or when invoked with a prefix argument), mark
the post as \"VIP\", ie. don't bump the thread."
  (interactive "P")
  (when (and vip (not sbbs--thread-id))
    (user-error "A new thread cannot be VIP"))
  (let ((board sbbs--board)
        (url-request-method "POST")
        (url-request-extra-headers
         '(("Content-Type" . "application/x-www-form-urlencoded")))
        (url-request-data
         (url-build-query-string
          `((epistula ,(buffer-string))
            (ornamentum "") (name "") (message "")
            (frontpage ,(if sbbs--thread-id "true" "false"))
            ,(if vip `(vip "on") nil)
            . ,(and (not sbbs--thread-id)
                    `((titulus ,(read-string "Headline: ")))))))
        (url (if sbbs--thread-id
                 (sbbs--board-url (format "%d/post" sbbs--thread-id))
               (sbbs--board-url "/post"))))
    (url-retrieve url (lambda (status buf)
                        (if (plist-get status :error)