Danny ad2c17876f
ContactInfo added to exchange package (#574)
ContactInfo created for models.Contactable. ContactInfo test suite created.
2022-08-17 13:47:27 +00:00

21 lines
423 B
Go

package exchange
import (
"github.com/microsoftgraph/msgraph-sdk-go/models"
"github.com/alcionai/corso/pkg/backup/details"
)
// ContactInfo translate models.Contactable metadata into searchable content
func ContactInfo(contact models.Contactable) *details.ExchangeInfo {
name := ""
if contact.GetDisplayName() != nil {
name = *contact.GetDisplayName()
}
return &details.ExchangeInfo{
ContactName: name,
}
}