Merge pull request #1830 from internetee/1828-send-poll-message-to-registrant-on-applying-and-removing-registry-lock

Registry lock: Notify Registrar by EPP notification
This commit is contained in:
Timo Võhmar 2021-02-11 13:14:44 +02:00 committed by GitHub
commit a3cca9149b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 50 additions and 7 deletions

View file

@ -15,12 +15,22 @@ xml.epp_head do
end if @object
end
if @notification.action&.contact
render(partial: 'epp/poll/action',
locals: {
builder: xml,
action: @notification.action
})
if @notification.action&.contact || @notification.registry_lock?
if @notification.registry_lock?
state = @notification.text.include?('unlocked') ? 'unlock' : 'lock'
xml.extension do
xml.tag!('changePoll:changeData',
'xmlns:changePoll': 'https://epp.tld.ee/schema/changePoll-1.0.xsd') do
xml.tag!('changePoll:operation', state)
end
end
else
render(partial: 'epp/poll/action',
locals: {
builder: xml,
action: @notification.action,
})
end
end
render('epp/shared/trID', builder: xml)