aboutsummaryrefslogtreecommitdiff
path: root/connector/external/config.go
blob: ae3cbdb76df4eee6bc4a7903c8f130c66fc74808 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package external

import (
	"os"

	. "git.deuxfleurs.fr/Deuxfleurs/easybridge/connector"
)

const MESSENGER_PROTOCOL = "Messenger"

func init() {
	Register(MESSENGER_PROTOCOL, Protocol{
		NewConnector: func() Connector {
			return &External{
				protocol: MESSENGER_PROTOCOL,
				command:  "./external/messenger.py",
				debug:    (os.Getenv("EASYBRIDGE_MESSENGER_DEBUG") == "true"),
			}
		},
		Schema: ConfigSchema{
			&ConfigEntry{
				Name:        "email",
				Description: "Email address",
				Required:    true,
			},
			&ConfigEntry{
				Name:        "password",
				Description: "Password",
				IsPassword:  true,
			},
			&ConfigEntry{
				Name:        "client_pickle",
				Description: "Client pickle (alternative login method)",
			},
			&ConfigEntry{
				Name:        "initial_backlog",
				Description: "Maximum number of messages to load when joining a channel",
				IsNumeric:   true,
				Default:     "100",
			},
		},
	})
}