|
|
|
@ -15,6 +15,7 @@ var channel keybase.Channel
@@ -15,6 +15,7 @@ var channel keybase.Channel
|
|
|
|
|
var channels [] keybase.Channel |
|
|
|
|
var stream bool = false |
|
|
|
|
var lastMessage keybase.ChatAPI |
|
|
|
|
|
|
|
|
|
func main() { |
|
|
|
|
if !k.LoggedIn { |
|
|
|
|
fmt.Println("You are not logged in.") |
|
|
|
@ -46,13 +47,9 @@ func populateChat(g *gocui.Gui) {
@@ -46,13 +47,9 @@ func populateChat(g *gocui.Gui) {
|
|
|
|
|
} else { |
|
|
|
|
var printMe []string |
|
|
|
|
var actuallyPrintMe string |
|
|
|
|
firstmsg := true |
|
|
|
|
lastMessage.ID = api.Result.Messages[0].Msg.ID |
|
|
|
|
for _, message := range api.Result.Messages { |
|
|
|
|
if message.Msg.Content.Type == "text" { |
|
|
|
|
if (firstmsg) { |
|
|
|
|
firstmsg = false |
|
|
|
|
lastMessage.ID = message.Msg.ID |
|
|
|
|
} |
|
|
|
|
msgSender := message.Msg.Sender.Username |
|
|
|
|
msgBody := message.Msg.Content.Text.Body |
|
|
|
|
newMessage := fmt.Sprintf("[%s]: %s", msgSender, msgBody) |
|
|
|
|