{"action":"created","comment":{"url":"https://api.github.com/repos/keybase/client/pulls/comments/82657719","pull_request_review_id":3550374,"id":82657719,"diff_hunk":"@@ -74,83 +77,134 @@ func (c *cmdChatSend) Run() (err error) {\n \t\tconversationInfo = *resolved\n \t}\n \n-\tswitch {\n-\tcase userChosen && len(c.message) == 0:\n-\t\tc.message, err = c.G().UI.GetTerminalUI().Prompt(PromptDescriptorEnterChatMessage, fmt.Sprintf(\"Send to [%s]? Hit Ctrl-C to cancel, or enter message content to send: \", conversationInfo.TlfName))\n-\t\tif err != nil {\n-\t\t\treturn err\n-\t\t}\n-\tcase userChosen:\n-\t\treturn errors.New(\"potential command line argument parsing error: we had a message before letting user choose a conversation\")\n-\tcase len(c.message) == 0:\n-\t\tc.message, err = c.G().UI.GetTerminalUI().Prompt(PromptDescriptorEnterChatMessage, \"Please enter message content: \")\n-\t\tif err != nil {\n-\t\t\treturn err\n-\t\t}\n-\tdefault:\n-\t}\n-\n \tvar args chat1.PostLocalArg\n \targs.ConversationID = conversationInfo.Id\n \n \tvar msgV1 chat1.MessagePlaintextV1\n \t// msgV1.ClientHeader.{Sender,SenderDevice} are filled by service\n \tmsgV1.ClientHeader.Conv = conversationInfo.Triple\n \tmsgV1.ClientHeader.TlfName = conversationInfo.TlfName\n-\tmsgV1.ClientHeader.MessageType = chat1.MessageType_TEXT\n-\tmsgV1.MessageBody = chat1.NewMessageBodyWithText(chat1.MessageText{Body: c.message})\n-\n-\targs.MessagePlaintext = chat1.NewMessagePlaintextWithV1(msgV1)\n \n-\tif _, err = chatClient.PostLocal(ctx, args); err != nil {\n-\t\treturn err\n-\t}\n-\n-\tif len(c.setTopicName) > 0 {\n+\t// Do one of set topic name, set headline, send message\n+\tswitch {\n+\tcase c.setTopicName != \"\":\n \t\tif conversationInfo.Triple.TopicType == chat1.TopicType_CHAT {\n \t\t\tc.G().UI.GetTerminalUI().Printf(\"We are not supporting setting topic name for chat conversations yet. Ignoring --set-topic-name >.<\")\n+\t\t\treturn nil\n \t\t}\n \t\tmsgV1.ClientHeader.MessageType = chat1.MessageType_METADATA\n \t\tmsgV1.MessageBody = chat1.NewMessageBodyWithMetadata(chat1.MessageConversationMetadata{ConversationTitle: c.setTopicName})\n-\t\targs.MessagePlaintext = chat1.NewMessagePlaintextWithV1(msgV1)\n-\t\tif _, err := chatClient.PostLocal(ctx, args); err != nil {\n-\t\t\treturn err\n+\tcase c.setHeadline != \"\":\n+\t\tmsgV1.ClientHeader.MessageType = chat1.MessageType_HEADLINE\n+\t\tmsgV1.MessageBody = chat1.NewMessageBodyWithHeadline(chat1.MessageHeadline{Headline: c.setHeadline})\n+\tcase c.clearHeadline:\n+\t\tmsgV1.ClientHeader.MessageType = chat1.MessageType_HEADLINE\n+\t\tmsgV1.MessageBody = chat1.NewMessageBodyWithHeadline(chat1.MessageHeadline{Headline: \"\"})\n+\tdefault:\n+\t\t// Ask for message contents\n+\t\tif len(c.message) == 0 {\n+\t\t\tpromptText := \"Please enter message content: \"\n+\t\t\tif userChosen {","path":"go/client/cmd_chat_send.go","position":93,"original_position":93,"commit_id":"df36f681bc77d972756ad314a0106e39af0c9f48","original_commit_id":"df36f681bc77d972756ad314a0106e39af0c9f48","user":{"login":"mlsteele","id":705646,"avatar_url":"https://avatars.githubusercontent.com/u/705646?v=3","gravatar_id":"","url":"https://api.github.com/users/mlsteele","html_url":"https://github.com/mlsteele","followers_url":"https://api.github.com/users/mlsteele/followers","following_url":"https://api.github.com/users/mlsteele/following{/other_user}","gists_url":"https://api.github.com/users/mlsteele/gists{/gist_id}","starred_url":"https://api.github.com/users/mlsteele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlsteele/subscriptions","organizations_url":"https://api.github.com/users/mlsteele/orgs","repos_url":"https://api.github.com/users/mlsteele/repos","events_url":"https://api.github.com/users/mlsteele/events{/privacy}","received_events_url":"https://api.github.com/users/mlsteele/received_events","type":"User","site_admin":false},"body":"Ah ok. I don't quite get why the prompt, but if that's the plan then that sounds good. Also, the choose menu seems appears to be broken, I made CORE-3921 for that.","created_at":"2016-10-10T18:25:57Z","updated_at":"2016-10-10T18:25:57Z","html_url":"https://github.com/keybase/client/pull/4579#discussion_r82657719","pull_request_url":"https://api.github.com/repos/keybase/client/pulls/4579","_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/comments/82657719"},"html":{"href":"https://github.com/keybase/client/pull/4579#discussion_r82657719"},"pull_request":{"href":"https://api.github.com/repos/keybase/client/pulls/4579"}}},"pull_request":{"url":"https://api.github.com/repos/keybase/client/pulls/4579","id":88703128,"html_url":"https://github.com/keybase/client/pull/4579","diff_url":"https://github.com/keybase/client/pull/4579.diff","patch_url":"https://github.com/keybase/client/pull/4579.patch","issue_url":"https://api.github.com/repos/keybase/client/issues/4579","number":4579,"state":"open","locked":false,"title":"enable set-headline","user":{"login":"mlsteele","id":705646,"avatar_url":"https://avatars.githubusercontent.com/u/705646?v=3","gravatar_id":"","url":"https://api.github.com/users/mlsteele","html_url":"https://github.com/mlsteele","followers_url":"https://api.github.com/users/mlsteele/followers","following_url":"https://api.github.com/users/mlsteele/following{/other_user}","gists_url":"https://api.github.com/users/mlsteele/gists{/gist_id}","starred_url":"https://api.github.com/users/mlsteele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlsteele/subscriptions","organizations_url":"https://api.github.com/users/mlsteele/orgs","repos_url":"https://api.github.com/users/mlsteele/repos","events_url":"https://api.github.com/users/mlsteele/events{/privacy}","received_events_url":"https://api.github.com/users/mlsteele/received_events","type":"User","site_admin":false},"body":"Add the ability to send `Headline` messages from `chat send` as well as see them in `chat read`\r\n\r\n`keybase chat send gil --set-headline \"fishing tips\"`\r\n`keybase chat send gil --clear-headline`\r\n\r\nIntroduces `MessageType.HEADLINE`. It looks like old clients will not have any problem with the existence of Headline messages, and will ignore them. But I'm not totally clear on why that is.\r\n\r\nHeadline messages cannot be deleted by a Delete message, and do not use `supersedes`/`supersededBy`. It's easy to find the latest headline through `maxMessages`.\r\n\r\n```\r\n$ kbu chat read gil\r\nfetching conversation frank,gil ...\r\n\r\nheadline: fishing tips\r\n\r\n[1]  [frank 31m] mesa\r\n[2]  [frank 33m] a mesasege\r\n[3]  [frank 34m] test\r\n[4]   [frank 3h] yo\r\n[5]   [frank 4d] hi\r\n```\r\n\r\nr? @songgao \r\ncc @mmaxim ","created_at":"2016-10-10T17:42:16Z","updated_at":"2016-10-10T18:25:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4a1e5bd106f9f79c4ee67a3f6732b2a53b6676e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/keybase/client/pulls/4579/commits","review_comments_url":"https://api.github.com/repos/keybase/client/pulls/4579/comments","review_comment_url":"https://api.github.com/repos/keybase/client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/keybase/client/issues/4579/comments","statuses_url":"https://api.github.com/repos/keybase/client/statuses/df36f681bc77d972756ad314a0106e39af0c9f48","head":{"label":"keybase:miles/CORE-3684-set-headline","ref":"miles/CORE-3684-set-headline","sha":"df36f681bc77d972756ad314a0106e39af0c9f48","user":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"name":"client","full_name":"keybase/client","owner":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/client/deployments","created_at":"2015-01-11T17:17:12Z","updated_at":"2016-10-10T15:42:29Z","pushed_at":"2016-10-10T18:22:18Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":165061,"stargazers_count":794,"watchers_count":794,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":537,"forks":75,"open_issues":537,"watchers":794,"default_branch":"master"}},"base":{"label":"keybase:master","ref":"master","sha":"461b8662d35368ce950713c91415afd903b248f1","user":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"repo":{"id":29099181,"name":"client","full_name":"keybase/client","owner":{"login":"keybase","id":5400834,"avatar_url":"https://avatars.githubusercontent.com/u/5400834?v=3","gravatar_id":"","url":"https://api.github.com/users/keybase","html_url":"https://github.com/keybase","followers_url":"https://api.github.com/users/keybase/followers","following_url":"https://api.github.com/users/keybase/following{/other_user}","gists_url":"https://api.github.com/users/keybase/gists{/gist_id}","starred_url":"https://api.github.com/users/keybase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keybase/subscriptions","organizations_url":"https://api.github.com/users/keybase/orgs","repos_url":"https://api.github.com/users/keybase/repos","events_url":"https://api.github.com/users/keybase/events{/privacy}","received_events_url":"https://api.github.com/users/keybase/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/keybase/client","description":"Keybase Go Library, Client, Service, OS X, iOS, Android, Electron","fork":false,"url":"https://api.github.com/repos/keybase/client","forks_url":"https://api.github.com/repos/keybase/client/forks","keys_url":"https://api.github.com/repos/keybase/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keybase/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keybase/client/teams","hooks_url":"https://api.github.com/repos/keybase/client/hooks","issue_events_url":"https://api.github.com/repos/keybase/client/issues/events{/number}","events_url":"https://api.github.com/repos/keybase/client/events","assignees_url":"https://api.github.com/repos/keybase/client/assignees{/user}","branches_url":"https://api.github.com/repos/keybase/client/branches{/branch}","tags_url":"https://api.github.com/repos/keybase/client/tags","blobs_url":"https://api.github.com/repos/keybase/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keybase/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keybase/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/keybase/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keybase/client/statuses/{sha}","languages_url":"https://api.github.com/repos/keybase/client/languages","stargazers_url":"https://api.github.com/repos/keybase/client/stargazers","contributors_url":"https://api.github.com/repos/keybase/client/contributors","subscribers_url":"https://api.github.com/repos/keybase/client/subscribers","subscription_url":"https://api.github.com/repos/keybase/client/subscription","commits_url":"https://api.github.com/repos/keybase/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/keybase/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/keybase/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/keybase/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/keybase/client/contents/{+path}","compare_url":"https://api.github.com/repos/keybase/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keybase/client/merges","archive_url":"https://api.github.com/repos/keybase/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keybase/client/downloads","issues_url":"https://api.github.com/repos/keybase/client/issues{/number}","pulls_url":"https://api.github.com/repos/keybase/client/pulls{/number}","milestones_url":"https://api.github.com/repos/keybase/client/milestones{/number}","notifications_url":"https://api.github.com/repos/keybase/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keybase/client/labels{/name}","releases_url":"https://api.github.com/repos/keybase/client/releases{/id}","deployments_url":"https://api.github.com/repos/keybase/client/deployments","created_at":"2015-01-11T17:17:12Z","updated_at":"2016-10-10T15:42:29Z","pushed_at":"2016-10-10T18:22:18Z","git_url":"git://github.com/keybase/client.git","ssh_url":"git@github.com:keybase/client.git","clone_url":"https://github.com/keybase/client.git","svn_url":"https://github.com/keybase/client","homepage":"","size":165061,"stargazers_count":794,"watchers_count":794,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":75,"mirror_url":null,"open_issues_count":537,"forks":75,"open_issues":537,"watchers":794,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/keybase/client/pulls/4579"},"html":{"href":"https://github.com/keybase/client/pull/4579"},"issue":{"href":"https://api.github.com/repos/keybase/client/issues/4579"},"comments":{"href":"https://api.github.com/repos/keybase/client/issues/4579/comments"},"review_comments":{"href":"https://api.github.com/repos/keybase/client/pulls/4579/comments"},"review_comment":{"href":"https://api.github.com/repos/keybase/client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/keybase/client/pulls/4579/commits"},"statuses":{"href":"https://api.github.com/repos/keybase/client/statuses/df36f681bc77d972756ad314a0106e39af0c9f48"}}}}
{"actor":{"display_login":"mlsteele"}}