@seafile/sdoc-editor 3.0.168 → 3.0.170

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -41,11 +41,17 @@ var useNotificationsMount = exports.useNotificationsMount = function useNotifica
41
41
  }, [collaborators, t]);
42
42
  var request = (0, _react.useCallback)(/*#__PURE__*/function () {
43
43
  var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/(0, _regenerator2["default"])().m(function _callee(notification) {
44
- var eventBus, res, notifications, _t;
44
+ var to_users, currentUserInfo, eventBus, res, notifications, _t;
45
45
  return (0, _regenerator2["default"])().w(function (_context) {
46
46
  while (1) switch (_context.p = _context.n) {
47
47
  case 0:
48
- popupBrowserCommentNotification(notification);
48
+ if (notification) {
49
+ to_users = notification.to_users;
50
+ currentUserInfo = _context2["default"].getUserInfo();
51
+ if (Array.isArray(to_users) && to_users.length > 0 && to_users.includes(currentUserInfo.username)) {
52
+ popupBrowserCommentNotification(notification);
53
+ }
54
+ }
49
55
  eventBus = _eventBus["default"].getInstance();
50
56
  dispatch({
51
57
  type: _constants2.DOC_NOTIFICATION_REDUCER_TYPE.FETCHING
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "3.0.168",
3
+ "version": "3.0.170",
4
4
  "main": "dist/index.js",
5
5
  "scripts": {
6
6
  "test": "jest",
@@ -72,5 +72,5 @@
72
72
  "publishConfig": {
73
73
  "access": "public"
74
74
  },
75
- "gitHead": "b7391715a9e98b8178352f2370d2c39a8614d3f7"
75
+ "gitHead": "9d509cd4708045eb29f2cf98f02f657e8579cd51"
76
76
  }