Skip to content

Commit

Permalink
Merge pull request #759 from jijojosephk/disable-notifications-flag
Browse files Browse the repository at this point in the history
New flag to disable all notifications
  • Loading branch information
jijojosephk authored Apr 21, 2023
2 parents 9027429 + abe42a1 commit 7fccb2e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/browser/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* global angular */
(function () {
const path = require('path');

const { ipcRenderer } = require('electron');
const pageTitleNotifications = require('./notifications/pageTitleNotifications');
const ActivityManager = require('./notifications/activityManager');
Expand Down Expand Up @@ -62,6 +60,9 @@
let classicNotification = window.Notification;
class CustomNotification {
constructor(title, options) {
if(config.disableNotifications){
return;
}
options = options || {};
options.icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAdhwAAHYcBj+XxZQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAZSSURBVHic7ZtbbBRVGMf/35nZ3RZoacPuQgqRGC6KRCUGTYWIiCRCqiGEFlEpRowYAvRFo4G2uMhu1Zj4YGMMJiRGUmhttYECvpjIRSJKguFiakBCuARpdy30QunuzsznQ3crdK8zO7tDZH8vnT3nfJfznducM6dAnvsbstL4uh1scwa6ZwmNpgCAJvhqwOnu/OptCufKB0sCsLnBP1OovAWgZQBKRmXfAHifJlHDR1tc57LtS24DwEy12wMeELYAkFOUDhPQ4K1zbgMRZ8ul3AWAmWq9gSYAr+gRI2C3t865OltBkLKhNB610sZtIGw0IProM0cG+ehPnx423SnkqAcMj3mcBWAzqEIh0GPeemenmX4BqcehKUQmPKOVBwCZCe8BeCNZoeXVx9yaItcQUAFgRiT5HIgPkKQ2tu+a3z1aJus9YN0Otrm6A10ASjNUddPvdroTLZHLX/21ihk7ARQlkO9n5rV7m8vb7kwUGTqVkold3Y8g88oDQIkz0D0rXkak8i1I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kj//9Ph5EsNkKUTimFHb7WIwd5xxJN8KtwWC6RcMg1LQ3l38RTTDty9CUaU+3KMHbz2eiQ5bshuSCodBJAE+kKPYzaWJ9e8uTZ++yachiHLQCqYVD1EjMDr2yJARk2QFHQbER033uqa6FPT23pgviKpA2h5gmA5CYcRFEZ1goe/Y2zTsT17YRi4l4a8Ohb1RNqdYrV1hYgpLSqcaMMj7zbXW9Y0zY5M2QbJc8YCS86TQaIoGCgvEoHj/ZqMmgqimNqYsl8SET4XjUev1bwdhmtt64ENf76tzeTFSY/ipsU5wNAH4zW28cTvldrk8yVWJ6ADweUgjqKgaumq07CgNXQeIlM/67LCubIW/9pIsCvIiBmLu9JtAlsVjiq5twxQxlWdsNeuvd54nkeQAfN0snAydsqpi7feuEP8zSmdXtsK+u9JLf7VpAIB+A2xmoGgST164OLPB4Jpg6tHJ2i8nj8ZeFZd4MpjUA0n3juQlCs00RPrMrHiXn17g2fX7eUdRfshgaLyXQLAAPAYjuhkIAOsF0GkI90lfct7+xZkbaL/p58ujnX2ufCTgt/KXpAAAAAElFTkSuQmCC';
const notifSound = {
Expand Down
1 change: 1 addition & 0 deletions app/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ Here is the list of available arguments and its usage:
| customUserDir | Custom User Directory so that you can have multiple profiles | |
| appLogLevels | Comma separated list of log levels (error,warn,info,debug) | error,warn |
| clearStorage | Whether to clear the storage before creating the window or not | false |
| disableNotifications | A flag to disable all notifications | false |
| disableMeetingNotifications | Whether to disable meeting notifications or not | false |
| disableNotificationSound | Disable chat/meeting start notification sound | false |
| disableNotificationSoundIfNotAvailable | Disable chat/meeting start notification sound if status is not Available (e.g. busy, in a call) | true |
Expand Down
5 changes: 5 additions & 0 deletions app/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ function argv(configPath) {
describe: 'Whether to clear the storage before creating the window or not',
type: 'boolean'
},
disableNotifications: {
default: false,
describe: 'A flag to disable all notifications',
type: 'boolean'
},
disableMeetingNotifications: {
default: false,
describe: 'Whether to disable meeting notifications or not',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "teams-for-linux",
"version": "1.0.68",
"version": "1.0.69",
"main": "app/index.js",
"description": "Unofficial client for Microsoft Teams for Linux",
"homepage": "https://github.com/IsmaelMartinez/teams-for-linux",
Expand Down

0 comments on commit 7fccb2e

Please sign in to comment.