mod_easy_invite/mod_easy_invite.lua
changeset 4086 6cdbca89b8be
parent 4027 7e2db4d61f6c
child 4087 e7eb46d976ae
--- a/mod_easy_invite/mod_easy_invite.lua	Mon Sep 07 13:04:01 2020 +0100
+++ b/mod_easy_invite/mod_easy_invite.lua	Mon Sep 07 12:50:36 2020 +0100
@@ -174,14 +174,15 @@
 		return;
 	end
 	local inviter_username = validated_invite.inviter;
+	local contact_username = event.username;
 	validated_invite:use();
 
-	if not inviter_username then return; end
+	if inviter_username then
+		module:log("debug", "Creating mutual subscription between %s and %s", inviter_username, contact_username);
+		subscribe_both(module.host, inviter_username, contact_username);
+	end
 
-	local contact_username = event.username;
 
-	module:log("debug", "Creating mutual subscription between %s and %s", inviter_username, contact_username);
-	subscribe_both(module.host, inviter_username, contact_username);
 end);
 
 do