stores visited page title

pull/1818/head
Diego Sampaio 10 years ago
parent e398b3e7d0
commit 628ba2b367
  1. 2
      packages/rocketchat-livechat/app/client/lib/triggers.js
  2. 5
      packages/rocketchat-livechat/assets/rocket-livechat.js

@ -54,7 +54,7 @@ this.Triggers = (function() {
trigger.conditions.forEach(function(condition) {
switch (condition.name) {
case 'page-url':
if (request.href.match(new RegExp(condition.value))) {
if (request.location.href.match(new RegExp(condition.value))) {
fire(trigger.actions);
}
break;

@ -70,7 +70,10 @@
};
var pageVisited = function() {
callHook('pageVisited', JSON.parse(JSON.stringify(document.location)));
callHook('pageVisited', {
location: JSON.parse(JSON.stringify(document.location)),
title: document.title
});
};
var currentPage = {

Loading…
Cancel
Save