2020-02-29 17:30:43 +00:00
|
|
|
package external
|
|
|
|
|
|
|
|
import (
|
2020-03-04 22:04:01 +00:00
|
|
|
"os"
|
|
|
|
|
2020-02-29 17:30:43 +00:00
|
|
|
. "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",
|
2020-03-04 22:04:01 +00:00
|
|
|
debug: (os.Getenv("EASYBRIDGE_MESSENGER_DEBUG") == "true"),
|
2020-02-29 17:30:43 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
Schema: ConfigSchema{
|
|
|
|
&ConfigEntry{
|
|
|
|
Name: "email",
|
|
|
|
Description: "Email address",
|
|
|
|
Required: true,
|
|
|
|
},
|
|
|
|
&ConfigEntry{
|
|
|
|
Name: "password",
|
|
|
|
Description: "Password",
|
|
|
|
IsPassword: true,
|
2020-03-05 15:59:37 +00:00
|
|
|
},
|
|
|
|
&ConfigEntry{
|
|
|
|
Name: "client_pickle",
|
|
|
|
Description: "Client pickle (alternative login method)",
|
2020-02-29 17:30:43 +00:00
|
|
|
},
|
2020-03-01 14:48:58 +00:00
|
|
|
&ConfigEntry{
|
|
|
|
Name: "initial_backlog",
|
|
|
|
Description: "Maximum number of messages to load when joining a channel",
|
|
|
|
IsNumeric: true,
|
|
|
|
Default: "100",
|
|
|
|
},
|
2020-02-29 17:30:43 +00:00
|
|
|
},
|
|
|
|
})
|
|
|
|
}
|