public async Task OnMessageAsync(UserCurrentLocationChangedEvent obj) { try { LocationDetails location = _mapper.Map <LocationDetails>(obj.Location); _membershipService.UpdateCachedUserLocation(obj.User.UserId, location); } catch (Exception ex) { _logger.LogError(ex, "Failed to update user location"); // Sink. } }
public async Task OnMessageAsync(UserCurrentLocationChangedEvent obj) { try { LocationDetails location = _mapper.Map <LocationDetails>(obj.Location); await _membershipService.UpdateUserPropertiesLocationAsync(obj.User.AccountId, obj.User.UserId, location); } catch (Exception ex) { _logger.LogError(ex, "Failed to update user properties location"); // Sink. } }