Skip to content

Commit

Permalink
Merge pull request #98 from arborchat/noannounce
Browse files Browse the repository at this point in the history
Remove join/quit messages entirely
  • Loading branch information
whereswaldon authored Feb 1, 2019
2 parents d0f46f2 + 4a487f3 commit d4036ed
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions tui/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,6 @@ func (t *TUI) manageConnection(c types.Connection) {
log.Println("Connected to server")
go func() {
t.Client.AnnounceHere(t.SessionID())
for i := 0; i < 5; i++ {
if root, err := t.histState.Root(); err == nil {
t.Client.Reply(root, "[join]")
return
}
time.Sleep(5 * time.Second)
}
log.Println("Gave up greeting server")
}()
break
}
Expand Down Expand Up @@ -159,12 +151,6 @@ func (t *TUI) Display(message *arbor.ChatMessage) {
// a keystroke or mouse input handler.
func (t *TUI) quit(c *gocui.Gui, v *gocui.View) error {
t.Client.AnnounceLeaving(t.SessionID())
if root, err := t.histState.Root(); err != nil {
log.Println("Not notifying that we quit:", err)
} else {
t.Client.Reply(root, "[quit]")
time.Sleep(time.Millisecond * 250) // wait in the hope that Quit will be sent
}
return gocui.ErrQuit
}

Expand Down

0 comments on commit d4036ed

Please sign in to comment.