Skip to content

Commit

Permalink
Always include topic in comment JSON
Browse files Browse the repository at this point in the history
For existing comments.
  • Loading branch information
kohler committed Sep 17, 2024
1 parent 4779154 commit c869e02
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/commentinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -649,11 +649,13 @@ function unparse_json(Contact $viewer, $no_content = false) {
// visibility, topic
if ($this->commentId !== 0) {
$cj["visibility"] = self::$visibility_map[$this->commentType & self::CTM_VIS];
}
if (($this->commentType & self::CTM_TOPIC) === self::CT_TOPIC_PAPER) {
$cj["topic"] = "paper";
} else if (($this->commentType & self::CTM_TOPIC) === self::CT_TOPIC_DECISION) {
$cj["topic"] = "dec";
if (($this->commentType & self::CTM_TOPIC) === self::CT_TOPIC_PAPER) {
$cj["topic"] = "paper";
} else if (($this->commentType & self::CTM_TOPIC) === self::CT_TOPIC_DECISION) {
$cj["topic"] = "dec";
} else {
$cj["topic"] = "rev";
}
}

// blindness, draftness, authorness, format
Expand Down

0 comments on commit c869e02

Please sign in to comment.