public async Task<MMM.FileAttachment> AddEventAttachment(string eventId, MMM.FileAttachment fileAttachment) { var attachment = fileAttachment.ConvertObject<Attachment>(); var item = await _graphClient.Me.Events[eventId].Attachments.Request().AddAsync(attachment); return attachment.ConvertObject<MMM.FileAttachment>(); }
public async Task<bool> UpdateAndSendMessage(MMM.Message message) { var newMessage = message.ConvertObject<Microsoft.Graph.Message>(); if (await _graphClient.Me.Messages[message.Id].Request().UpdateAsync(newMessage) == null) { return false; } await _graphClient.Me.Messages[message.Id].Send().Request().PostAsync(); return true; }