Skip to content

Commit dcd9ee6

Browse files
foxcppsblinch
andcommitted
Add IDLE to capabilities list
IDLE was changed into a built-in extension, but the default capabilities list was never updated to include it. The go-imap/client library (and probably any other sane IMAP client) resorts to polling if the IDLE cap isn't present. Co-authored-by: sblinch <[email protected]> Closes #453.
1 parent 16ffd07 commit dcd9ee6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

server/conn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func (c *conn) Close() error {
163163
}
164164

165165
func (c *conn) Capabilities() []string {
166-
caps := []string{"IMAP4rev1", "LITERAL+", "SASL-IR", "CHILDREN", "UNSELECT", "MOVE"}
166+
caps := []string{"IMAP4rev1", "LITERAL+", "SASL-IR", "CHILDREN", "UNSELECT", "MOVE", "IDLE"}
167167

168168
appendLimitSet := false
169169
if c.ctx.State == imap.AuthenticatedState {

server/server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
// Extnesions that are always advertised by go-imap server.
13-
const builtinExtensions = "LITERAL+ SASL-IR CHILDREN UNSELECT MOVE APPENDLIMIT"
13+
const builtinExtensions = "LITERAL+ SASL-IR CHILDREN UNSELECT MOVE IDLE APPENDLIMIT"
1414

1515
func testServer(t *testing.T) (s *server.Server, conn net.Conn) {
1616
bkd := memory.New()

0 commit comments

Comments
 (0)