aboutsummaryrefslogtreecommitdiff
path: root/commands/msg/invite.go
diff options
context:
space:
mode:
Diffstat (limited to 'commands/msg/invite.go')
-rw-r--r--commands/msg/invite.go21
1 files changed, 1 insertions, 20 deletions
diff --git a/commands/msg/invite.go b/commands/msg/invite.go
index 76864f9a..60107480 100644
--- a/commands/msg/invite.go
+++ b/commands/msg/invite.go
@@ -78,26 +78,7 @@ func (invite) Execute(args []string) error {
return fmt.Errorf("no participation status defined")
}
- conf := acct.AccountConfig()
- from := conf.From
-
- // figure out the sending from address if we have aliases
- if len(conf.Aliases) != 0 {
- rec := newAddrSet()
- rec.AddList(msg.Envelope.To)
- rec.AddList(msg.Envelope.Cc)
- // test the from first, it has priority over any present alias
- if rec.Contains(from) {
- // do nothing
- } else {
- for _, a := range conf.Aliases {
- if rec.Contains(a) {
- from = a
- break
- }
- }
- }
- }
+ from := chooseFromAddr(acct.AccountConfig(), msg)
var to []*mail.Address