Fixes current errors as well --- #### Does this PR need a docs update or release note? - [ ] ✅ Yes, it's included - [ ] 🕐 Yes, but in a later PR - [x] ⛔ No #### Type of change - [ ] 🌻 Feature - [ ] 🐛 Bugfix - [ ] 🗺️ Documentation - [ ] 🤖 Supportability/Tests - [ ] 💻 CI/Deployment - [x] 🧹 Tech Debt/Cleanup #### Issue(s) * closes #2927 #### Test Plan - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
20 lines
440 B
Go
20 lines
440 B
Go
package graph
|
|
|
|
// Contains helper methods that are common across multiple
|
|
// Microsoft Graph Applications.
|
|
|
|
import (
|
|
"github.com/microsoftgraph/msgraph-sdk-go/models"
|
|
|
|
"github.com/alcionai/corso/src/internal/common/ptr"
|
|
)
|
|
|
|
func UnwrapEmailAddress(contact models.Recipientable) string {
|
|
var empty string
|
|
if contact == nil || contact.GetEmailAddress() == nil {
|
|
return empty
|
|
}
|
|
|
|
return ptr.Val(contact.GetEmailAddress().GetAddress())
|
|
}
|