Formatting

This commit is contained in:
Gregory Rudolph
2019-10-04 12:41:43 -04:00
parent aa2188e858
commit 43bb85438f
2 changed files with 5 additions and 7 deletions

View File

@ -23,7 +23,7 @@ func cmdEdit(cmd []string) {
var messageId int var messageId int
if len(cmd) == 2 { if len(cmd) == 2 {
messageId, _ = strconv.Atoi(cmd[1]) messageId, _ = strconv.Atoi(cmd[1])
printToView("Input", fmt.Sprintf("/edit %d Type edit here",messageId)) printToView("Input", fmt.Sprintf("/edit %d Type edit here", messageId))
return return
} }
if len(cmd) < 3 { if len(cmd) < 3 {
@ -33,11 +33,9 @@ func cmdEdit(cmd []string) {
messageId, _ = strconv.Atoi(cmd[1]) messageId, _ = strconv.Atoi(cmd[1])
chat := k.NewChat(channel) chat := k.NewChat(channel)
newMessage := strings.Join(cmd[2:], " ") newMessage := strings.Join(cmd[2:], " ")
_, err := chat.Edit(messageId,newMessage) _, err := chat.Edit(messageId, newMessage)
if err != nil { if err != nil {
printToView("Feed", fmt.Sprintf("Error editing message %d, %+v", messageId, err)) printToView("Feed", fmt.Sprintf("Error editing message %d, %+v", messageId, err))
} }
} }

View File

@ -257,13 +257,13 @@ func initKeybindings() error {
func updateChatWindow() { func updateChatWindow() {
runOpts := keybase.RunOptions { runOpts := keybase.RunOptions{
Dev: dev, Dev: dev,
} }
k.Run(func(api keybase.ChatAPI) { k.Run(func(api keybase.ChatAPI) {
handleMessage(api) handleMessage(api)
}, },
runOpts) runOpts)
} }