updateResolvedStatus calculates the aggregate status of a single comment thread, and updates the "Resolved" field of that thread accordingly.
()
| 148 | // updateResolvedStatus calculates the aggregate status of a single comment thread, |
| 149 | // and updates the "Resolved" field of that thread accordingly. |
| 150 | func (thread *CommentThread) updateResolvedStatus() { |
| 151 | resolved := updateThreadsStatus(thread.Children) |
| 152 | if resolved == nil { |
| 153 | thread.Resolved = thread.Comment.Resolved |
| 154 | return |
| 155 | } |
| 156 | |
| 157 | if !*resolved { |
| 158 | thread.Resolved = resolved |
| 159 | return |
| 160 | } |
| 161 | |
| 162 | if thread.Comment.Resolved == nil || !*thread.Comment.Resolved { |
| 163 | thread.Resolved = nil |
| 164 | return |
| 165 | } |
| 166 | |
| 167 | thread.Resolved = resolved |
| 168 | } |
| 169 | |
| 170 | // Verify verifies the signature on a comment. |
| 171 | func (thread *CommentThread) Verify() error { |