mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
MM-52857 - Expose webapp and desktop notifications to plugins (#23779)
* prevent media keys from controlling calls ring sounds * stop ring on pause * expose notifyMe as sendDesktopNotificationToMe * Revert "stop ring on pause" This reverts commit83d62ad02d. * Revert "prevent media keys from controlling calls ring sounds" This reverts commit6d4ff63936. * move into WebappUtils --------- Co-authored-by: Mattermost Build <build@mattermost.com>
This commit is contained in:
committed by
GitHub
parent
cad2df1259
commit
4e64590564
@@ -210,7 +210,7 @@ export function sendDesktopNotification(post, msgProps) {
|
||||
};
|
||||
}
|
||||
|
||||
const notifyMe = (title, body, channel, teamId, silent, soundName, url) => (dispatch) => {
|
||||
export const notifyMe = (title, body, channel, teamId, silent, soundName, url) => (dispatch) => {
|
||||
// handle notifications in desktop app
|
||||
if (isDesktopApp()) {
|
||||
const msg = {
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import {closeRightHandSide, selectPostById} from 'actions/views/rhs';
|
||||
import {notifyMe} from 'actions/notification_actions';
|
||||
import {getSelectedPostId, getIsRhsOpen} from 'selectors/rhs';
|
||||
|
||||
import BotTag from 'components/widgets/tag/bot_tag';
|
||||
@@ -50,6 +51,7 @@ window.useNotifyAdmin = useNotifyAdmin;
|
||||
window.WebappUtils = {
|
||||
modals: {openModal, ModalIdentifiers},
|
||||
notificationSounds: {ring: NotificationSounds.ring, stopRing: NotificationSounds.stopRing},
|
||||
sendDesktopNotificationToMe: notifyMe,
|
||||
};
|
||||
Object.defineProperty(window.WebappUtils, 'browserHistory', {
|
||||
get: () => getHistory(),
|
||||
|
||||
Reference in New Issue
Block a user