Correct invalid list.id references
j3s j3s@c3f.net
Fri, 15 Nov 2019 14:31:28 -0600
1 files changed,
4 insertions(+),
4 deletions(-)
jump to
M
main.go
→
main.go
@@ -229,11 +229,11 @@
// Handle a subscribe command func handleSubscribe(msg *email.Email) { listId := strings.TrimPrefix(msg.Subject, "Subscribe ") - listId = strings.TrimPrefix(msg.Subject, "subscribe ") + listId = strings.TrimPrefix(listId, "subscribe ") list := lookupList(listId) if list == nil { - handleInvalidRequest(msg, list.Id) + handleInvalidRequest(msg, listId) os.Exit(0) }@@ -252,11 +252,11 @@
// Handle an unsubscribe command func handleUnsubscribe(msg *email.Email) { listId := strings.TrimPrefix(msg.Subject, "Unsubscribe ") - listId = strings.TrimPrefix(msg.Subject, "unsubscribe ") + listId = strings.TrimPrefix(listId, "unsubscribe ") list := lookupList(listId) if list == nil { - handleInvalidRequest(msg, list.Id) + handleInvalidRequest(msg, listId) os.Exit(0) }