mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-17 09:37:02 +00:00
policy: Tie mailbox extraction to Addressing for #33
This commit is contained in:
@@ -3,6 +3,7 @@ package test
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/jhillyerd/inbucket/pkg/config"
|
||||
"github.com/jhillyerd/inbucket/pkg/message"
|
||||
"github.com/jhillyerd/inbucket/pkg/policy"
|
||||
"github.com/jhillyerd/inbucket/pkg/storage"
|
||||
@@ -55,7 +56,8 @@ func (m *ManagerStub) GetMetadata(mailbox string) ([]*message.Metadata, error) {
|
||||
|
||||
// MailboxForAddress invokes policy.ParseMailboxName.
|
||||
func (m *ManagerStub) MailboxForAddress(address string) (string, error) {
|
||||
return policy.ParseMailboxName(address)
|
||||
addrPolicy := &policy.Addressing{Config: &config.Root{}}
|
||||
return addrPolicy.ExtractMailbox(address)
|
||||
}
|
||||
|
||||
// MarkSeen marks a message as having been read.
|
||||
|
||||
Reference in New Issue
Block a user