Update contact regex, fix login
This commit is contained in:
parent
d9f71f1a3f
commit
20048736eb
1 changed files with 3 additions and 3 deletions
6
bot.go
6
bot.go
|
|
@ -138,7 +138,7 @@ var scamPatterns = []scamPattern{
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "contact",
|
name: "contact",
|
||||||
re: regexp.MustCompile(`(?i)(?:\bdm\b|(send|write).*(?:private)?\s+.?\+.?|get\s+in\s+touch)|@\w+`),
|
re: regexp.MustCompile(`((?i)(?:\bdm\b|(send|write).*\bprivate\b|get\s+in\s+touch)|@\w+)`),
|
||||||
weight: 0.5,
|
weight: 0.5,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -476,8 +476,8 @@ func main() {
|
||||||
|
|
||||||
err = client.Run(ctx, func(ctx context.Context) error {
|
err = client.Run(ctx, func(ctx context.Context) error {
|
||||||
// Check if session exists; if not, authenticate
|
// Check if session exists; if not, authenticate
|
||||||
_, err := os.Stat(cfg.SessionPath)
|
info, _ := os.Stat(cfg.SessionPath)
|
||||||
if err != nil {
|
if info.Size() == 0 {
|
||||||
// Session doesn't exist, prompt for credentials
|
// Session doesn't exist, prompt for credentials
|
||||||
fmt.Print("Enter phone number: ")
|
fmt.Print("Enter phone number: ")
|
||||||
var phone string
|
var phone string
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue