Unverified Commit 2fdaeb06 authored by Robert Knight's avatar Robert Knight Committed by GitHub

Merge pull request #2122 from hypothesis/remove-user-changed-event

Remove unused `USER_CHANGED` event
parents 552407de 79050c29
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
export default { export default {
// Session state changes // Session state changes
/** The logged-in user changed */
USER_CHANGED: 'userChanged',
/** /**
* API tokens were fetched and saved to local storage by another client * API tokens were fetched and saved to local storage by another client
* instance. * instance.
......
...@@ -113,10 +113,6 @@ export default function session( ...@@ -113,10 +113,6 @@ export default function session(
lastLoadTime = Date.now(); lastLoadTime = Date.now();
if (userChanged) { if (userChanged) {
$rootScope.$broadcast(events.USER_CHANGED, {
profile: model,
});
// Associate error reports with the current user in Sentry. // Associate error reports with the current user in Sentry.
if (model.userid) { if (model.userid) {
sentry.setUserInfo({ sentry.setUserInfo({
......
...@@ -198,15 +198,6 @@ describe('sidebar/services/session', function () { ...@@ -198,15 +198,6 @@ describe('sidebar/services/session', function () {
}); });
describe('#update()', function () { describe('#update()', function () {
it('broadcasts USER_CHANGED when the user changes', function () {
const userChangeCallback = sinon.stub();
$rootScope.$on(events.USER_CHANGED, userChangeCallback);
session.update({
userid: 'fred',
});
assert.calledOnce(userChangeCallback);
});
it('updates the user ID for Sentry error reports', function () { it('updates the user ID for Sentry error reports', function () {
session.update({ session.update({
userid: 'anne', userid: 'anne',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment