Skip to content

Notifications Still Occurring If Mentioning Self #274

@xyzpw

Description

@xyzpw

Enabling notifications and mentioning oneself will still notify, for example, typing @myUsername in chat would play the notification name, and also the alert; this should not happen.
I am assuming changing

  if (
    typeof (myNick) === 'string' && (
      args.text.match(new RegExp('@' + myNick.split('#')[0] + '\\b', "gi")) ||
      ((args.type === "whisper" || args.type === "invite") && args.from)
    )
  ) {
    notify(args);
  }

to

  if (
    typeof (myNick) === 'string' && (
      args.text.match(new RegExp('@' + myNick.split('#')[0] + '\\b', "gi")) ||
      ((args.type === "whisper" || args.type === "invite") && args.from && args.from != myNick)
    )
  ) {
    notify(args);
  }

at function pushMessage in client.js might fix this issue, but I cannot test; see next issue below:

Another issue: trying to connect to a channel after running npm start on the cloned repo will not allow websocket connects; it just gets stuck on "can't connect; retrying" and loops it forever, so you can't even check if your code is correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions