|
|
@ -12,21 +12,20 @@ import ( |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
// Configurable section
|
|
|
|
// Configurable section
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var downloadPath = "/tmp/" |
|
|
|
var downloadPath = "/tmp/" |
|
|
|
var outputFormat = "┌──[$USER@$DEVICE] [$ID] [$DATE - $TIME]\n└╼ $MSG" |
|
|
|
var outputFormat = "┌──[$USER@$DEVICE] [$ID] [$DATE - $TIME]\n└╼ $MSG" |
|
|
|
|
|
|
|
|
|
|
|
// 02 = Day, Jan = Month, 06 = Year
|
|
|
|
// 02 = Day, Jan = Month, 06 = Year
|
|
|
|
var dateFormat = "02Jan06" |
|
|
|
var dateFormat = "02Jan06" |
|
|
|
|
|
|
|
|
|
|
|
// 15 = hours, 04 = minutes, 05 = seconds
|
|
|
|
// 15 = hours, 04 = minutes, 05 = seconds
|
|
|
|
var timeFormat = "15:04" |
|
|
|
var timeFormat = "15:04" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// End configurable section
|
|
|
|
// End configurable section
|
|
|
|
|
|
|
|
|
|
|
|
var k = keybase.NewKeybase() |
|
|
|
var k = keybase.NewKeybase() |
|
|
|
var channel keybase.Channel |
|
|
|
var channel keybase.Channel |
|
|
|
var channels [] keybase.Channel |
|
|
|
var channels []keybase.Channel |
|
|
|
var stream = false |
|
|
|
var stream = false |
|
|
|
var lastMessage keybase.ChatAPI |
|
|
|
var lastMessage keybase.ChatAPI |
|
|
|
|
|
|
|
|
|
|
@ -103,7 +102,7 @@ func sendChat(message string, g *gocui.Gui) { |
|
|
|
chat := k.NewChat(channel) |
|
|
|
chat := k.NewChat(channel) |
|
|
|
_, err := chat.Send(message) |
|
|
|
_, err := chat.Send(message) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
printToView(g,"Feed",fmt.Sprintf("There was an error %+v", err)) |
|
|
|
printToView(g, "Feed", fmt.Sprintf("There was an error %+v", err)) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
func formatOutput(api keybase.ChatAPI) string { |
|
|
|
func formatOutput(api keybase.ChatAPI) string { |
|
|
@ -421,7 +420,7 @@ func handleInput(g *gocui.Gui) error { |
|
|
|
if len(command) == 3 { |
|
|
|
if len(command) == 3 { |
|
|
|
reactToMessageId(command[1], command[2]) |
|
|
|
reactToMessageId(command[1], command[2]) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
printToView(g,"Feed","/r $messageId $desiredReaction") |
|
|
|
printToView(g, "Feed", "/r $messageId $desiredReaction") |
|
|
|
} |
|
|
|
} |
|
|
|
default: |
|
|
|
default: |
|
|
|
if inputString[:1] == "+" { |
|
|
|
if inputString[:1] == "+" { |
|
|
|