public static SendMessageData CreateSyncDataMessage(string body, string imageUrl, SurePortalModules module, Guid?objectId = null) { var message = new SendMessageData() { Id = Guid.NewGuid(), Action = ActionType.SyncData, Title = $"{ActionType.SyncData.ToString()}-{DateTime.Now.ToString("dd/MM/yyyy HH:mm")}", Body = body, ImageUrl = imageUrl, CustomData = new Dictionary <string, string>(), Module = module }; message.CustomData.Add("Module", module.ToString()); if (objectId.HasValue) { message.CustomData.Add("ObjectId", objectId.Value.ToString()); } return(message); }
public static SendMessageData CreateDisplayMessage(string title, string body, string imageUrl, SurePortalModules module, Guid?objectId = null) { var message = new SendMessageData() { Id = Guid.NewGuid(), Action = ActionType.Display, Title = title, Body = body, ImageUrl = imageUrl, CustomData = new Dictionary <string, string>(), Module = module }; message.CustomData.Add("Module", module.ToString()); if (objectId.HasValue) { message.CustomData.Add("ObjectId", objectId.Value.ToString()); } return(message); }