# HG changeset patch # User Matthew Wild # Date 1599479436 -3600 # Node ID 6cdbca89b8be0c1fd5c966315a76a1e92df51511 # Parent 3c18d8deeb3855a70ad46f4732df84a40b5c086e mod_easy_invite: Minor refactoring to begin merging additional changes from Snikket diff -r 3c18d8deeb38 -r 6cdbca89b8be mod_easy_invite/mod_easy_invite.lua --- 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