silly formatting changes

pull/4/head
Blake DeMarcy 2017-03-03 17:16:11 -06:00
parent 53961bbece
commit 410bb78d1e
2 changed files with 7 additions and 0 deletions

2
bbj.el
View File

@ -472,6 +472,7 @@ it worked on emacs 24."
(bbj-enter)
(unless (eql buffer (current-buffer))
(bbj-edit-post))))
(let* ((post (alist-get 'post_id (bbj-post-prop 'data)))
(adminp (bbj-request "is_admin" 'target_user bbj-username))
(message (alist-get 'body (bbj-post-prop 'data)))
@ -485,6 +486,7 @@ it worked on emacs 24."
(message bbj-descend request 'error 'description)
(message "post edited")
(bbj-enter-thread ,thread-id))))))
(cond
((numberp (bbj-descend query 'error 'code))
(message (bbj-descend query 'error 'description)))

View File

@ -166,8 +166,13 @@ def edit_post(json):
ok, obj = db.edit_handler(json, thread)
if ok:
if json.get("reformat"):
json["body"] = formatting.parse(json["body"])
obj["body"] = json["body"]
obj["lastmod"] = time()
obj["edited"] = True
db.thread_dump(json["thread_id"], thread)
return obj