aboutsummaryrefslogtreecommitdiff
path: root/sx-interaction.el
diff options
context:
space:
mode:
Diffstat (limited to 'sx-interaction.el')
-rw-r--r--sx-interaction.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/sx-interaction.el b/sx-interaction.el
index 6ecfa38..8b72ea5 100644
--- a/sx-interaction.el
+++ b/sx-interaction.el
@@ -291,7 +291,7 @@ TEXT is a string. Interactively, it is read from the minibufer."
;; The api returns the new DATA.
(when (> (length result) 0)
(sx--add-comment-to-object
- (sx--add-owner-to-object (list (cons 'display_name "(You)")) (elt result 0))
+ (sx--ensure-owner-in-object (list (cons 'display_name "(You)")) (elt result 0))
(if .post_id (sx--get-post .post_type .site_par .post_id) data))
;; Display the changes in `data'.
(sx--maybe-update-display)))))
@@ -345,7 +345,7 @@ OBJECT can be a question or an answer."
(setcar object `(comments . [,comment]))))
object)
-(defun sx--add-owner-to-object (owner object)
+(defun sx--ensure-owner-in-object (owner object)
"Add `owner' property with value OWNER to OBJECT."
(unless (cdr-safe (assq 'owner object))
(setcdr object (cons (car object) (cdr object)))