Show thread notification if thread timeline is closed (#9495)
* Show thread notification if thread timeline is closed * Simplify isViewingEventTimeline statement Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> * Fix show desktop notifications * Add RoomViewStore thread id assertions * Add Notifier tests * fix lint * Remove it.only Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
d273441596
commit
306a2449e5
7 changed files with 178 additions and 21 deletions
|
@ -116,6 +116,11 @@ export enum Action {
|
|||
*/
|
||||
ViewRoom = "view_room",
|
||||
|
||||
/**
|
||||
* Changes thread based on payload parameters. Should be used with ThreadPayload.
|
||||
*/
|
||||
ViewThread = "view_thread",
|
||||
|
||||
/**
|
||||
* Changes room based on room list order and payload parameters. Should be used with ViewRoomDeltaPayload.
|
||||
*/
|
||||
|
|
26
src/dispatcher/payloads/ThreadPayload.ts
Normal file
26
src/dispatcher/payloads/ThreadPayload.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
Copyright 2022 The Matrix.org Foundation C.I.C.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { ActionPayload } from "../payloads";
|
||||
import { Action } from "../actions";
|
||||
|
||||
/* eslint-disable camelcase */
|
||||
export interface ThreadPayload extends Pick<ActionPayload, "action"> {
|
||||
action: Action.ViewThread;
|
||||
|
||||
thread_id: string | null;
|
||||
}
|
||||
/* eslint-enable camelcase */
|
Loading…
Add table
Add a link
Reference in a new issue