Fix which assignment is being changed. Fixes #580

This commit is contained in:
Jonathan Kingston 2017-06-14 15:10:05 +01:00
parent d2b4d972e1
commit dfd420d1a5

View file

@ -448,9 +448,10 @@ const messageHandler = {
response = assignManager._getByContainer(m.message.userContextId);
break;
case "setOrRemoveAssignment":
// m.tabId is used for where to place the in content message
// m.url is the assignment to be removed/added
response = browser.tabs.get(m.tabId).then((tab) => {
const userContextId = assignManager.getUserContextIdFromCookieStore(tab);
return assignManager._setOrRemoveAssignment(tab.id, tab.url, userContextId, m.value);
return assignManager._setOrRemoveAssignment(tab.id, m.url, m.userContextId, m.value);
});
break;
case "exemptContainerAssignment":