Use support-addresses not notify_from

Stephen Paul Weber created

Change summary

forms/registration/snikket_wait.rb | 4 +++-
test/test_helper.rb                | 3 +++
2 files changed, 6 insertions(+), 1 deletion(-)

Detailed changes

forms/registration/snikket_wait.rb 🔗

@@ -11,5 +11,7 @@ field(
 	label: "If this takes more than 10 minutes, tap here to contact support",
 	var: "support",
 	type: "jid-single",
-	value: CONFIG[:notify_from]
+	value: CONFIG[:xep0157].find { |x|
+		x[:var] == "support-addresses"
+	}[:value]&.sub(/^xmpp:/, "")
 )

test/test_helper.rb 🔗

@@ -97,6 +97,9 @@ CONFIG = {
 		realm: "sip.example.com",
 		app: "sipappid"
 	},
+	xep0157: [
+		{ var: "support-addresses", value: "xmpp:tel@cheogram.com" }
+	],
 	credit_card_url: ->(*) { "http://creditcard.example.com?" },
 	electrum_notify_url: ->(*) { "http://notify.example.com" },
 	keep_area_codes: ["556"],