public async Task SendModuleTriggeredMessage(Module module) { try { var content = @"An alarm has been triggered at location: " + $"{module.Location.Name}, for module: {module.Name}."; await SendTwilioMessage(content); await SendPushNotification(module.Location, "Alarm Triggered", content); } catch (Exception e) { Console.WriteLine(e); } }
public async Task SendModuleOfflineMessage(Module module) { try { var content = $"Module: {module.Name} at location: " + $"{module.Location.Name} has changed to 'Offline'"; await SendTwilioMessage(content); await SendPushNotification(module.Location, "Module Office", content); } catch (Exception e) { Console.WriteLine(e); } }