+
+ local from_resource = string.gsub(stanza.attr.from, "^[^/]*/", "", 1);
+ if from_resource ~= stanza.attr.from then
+ if string.match(from_resource, "^Messaging%x%x%x%x%x%x%x%x?%x?")
+ or string.match(from_resource, "^messaging%-smgmailw%x%x%x%x%x%x%x%x")
+ or string.match(from_resource, "^messaging%-AChromeExtensionw%x%x%x%x%x%x%x%x")
+ or string.match(from_resource, "^messaging%-TalkGadgetw%x%x%x%x%x%x%x%x")
+ or string.match(from_resource, "^messaging%-lcsw_hangouts%x%x%x%x%x%x%x%x")
+ or string.match(from_resource, "^messaging%-lcsw_hangouts_%x%x%x%x%x%x%x%x") then
+ log("debug", "Voiding presence from: "..stanza.attr.from);
+ stanza.attr.type = "unavailable";
+ end
+ end