Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Commit 9c8721c

Browse files
author
Ryan Nystrom
committed
apply signature in AddCommentClient, fixes #353
1 parent 547c437 commit 9c8721c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Classes/Issues/AddCommentClient.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ final class AddCommentClient {
3434
}
3535

3636
func addComment(subjectId: String, body: String) {
37-
client.perform(mutation: AddCommentMutation(subjectId: subjectId, body: body)) { (result, error) in
37+
let bodyWithSignature = Signature.signed(text: body)
38+
39+
client.perform(mutation: AddCommentMutation(subjectId: subjectId, body: bodyWithSignature)) { (result, error) in
3840
if let commentNode = result?.data?.addComment?.commentEdge.node {
3941
let fragments = commentNode.fragments
4042
for listener in self.listeners {

Classes/Issues/IssuesViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ IssueTextActionsViewDelegate {
168168
let text = text {
169169
addCommentClient.addComment(
170170
subjectId: subjectId,
171-
body: Signature.signed(text: text)
171+
body: text
172172
)
173173
}
174174
}

0 commit comments

Comments
 (0)