silly formatting changes
parent
53961bbece
commit
410bb78d1e
2
bbj.el
2
bbj.el
|
@ -472,6 +472,7 @@ it worked on emacs 24."
|
||||||
(bbj-enter)
|
(bbj-enter)
|
||||||
(unless (eql buffer (current-buffer))
|
(unless (eql buffer (current-buffer))
|
||||||
(bbj-edit-post))))
|
(bbj-edit-post))))
|
||||||
|
|
||||||
(let* ((post (alist-get 'post_id (bbj-post-prop 'data)))
|
(let* ((post (alist-get 'post_id (bbj-post-prop 'data)))
|
||||||
(adminp (bbj-request "is_admin" 'target_user bbj-username))
|
(adminp (bbj-request "is_admin" 'target_user bbj-username))
|
||||||
(message (alist-get 'body (bbj-post-prop 'data)))
|
(message (alist-get 'body (bbj-post-prop 'data)))
|
||||||
|
@ -485,6 +486,7 @@ it worked on emacs 24."
|
||||||
(message bbj-descend request 'error 'description)
|
(message bbj-descend request 'error 'description)
|
||||||
(message "post edited")
|
(message "post edited")
|
||||||
(bbj-enter-thread ,thread-id))))))
|
(bbj-enter-thread ,thread-id))))))
|
||||||
|
|
||||||
(cond
|
(cond
|
||||||
((numberp (bbj-descend query 'error 'code))
|
((numberp (bbj-descend query 'error 'code))
|
||||||
(message (bbj-descend query 'error 'description)))
|
(message (bbj-descend query 'error 'description)))
|
||||||
|
|
|
@ -166,8 +166,13 @@ def edit_post(json):
|
||||||
ok, obj = db.edit_handler(json, thread)
|
ok, obj = db.edit_handler(json, thread)
|
||||||
|
|
||||||
if ok:
|
if ok:
|
||||||
|
|
||||||
|
if json.get("reformat"):
|
||||||
|
json["body"] = formatting.parse(json["body"])
|
||||||
|
|
||||||
obj["body"] = json["body"]
|
obj["body"] = json["body"]
|
||||||
obj["lastmod"] = time()
|
obj["lastmod"] = time()
|
||||||
obj["edited"] = True
|
obj["edited"] = True
|
||||||
db.thread_dump(json["thread_id"], thread)
|
db.thread_dump(json["thread_id"], thread)
|
||||||
|
|
||||||
return obj
|
return obj
|
||||||
|
|
Loading…
Reference in New Issue