Consider own broadcasts from other device as a playback (#9821)
This commit is contained in:
parent
32140855fb
commit
6c40e2476a
3 changed files with 49 additions and 29 deletions
|
@ -14,6 +14,7 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { Optional } from "matrix-events-sdk";
|
||||
import { EventType, MatrixEvent, MsgType, RelationType } from "matrix-js-sdk/src/matrix";
|
||||
|
||||
import {
|
||||
|
@ -24,10 +25,10 @@ import {
|
|||
import { mkEvent } from "../../test-utils";
|
||||
|
||||
export const mkVoiceBroadcastInfoStateEvent = (
|
||||
roomId: string,
|
||||
state: VoiceBroadcastInfoState,
|
||||
senderId: string,
|
||||
senderDeviceId: string,
|
||||
roomId: Optional<string>,
|
||||
state: Optional<VoiceBroadcastInfoState>,
|
||||
senderId: Optional<string>,
|
||||
senderDeviceId: Optional<string>,
|
||||
startedInfoEvent?: MatrixEvent,
|
||||
): MatrixEvent => {
|
||||
const relationContent = {};
|
||||
|
@ -41,9 +42,12 @@ export const mkVoiceBroadcastInfoStateEvent = (
|
|||
|
||||
return mkEvent({
|
||||
event: true,
|
||||
// @ts-ignore allow everything here for edge test cases
|
||||
room: roomId,
|
||||
// @ts-ignore allow everything here for edge test cases
|
||||
user: senderId,
|
||||
type: VoiceBroadcastInfoEventType,
|
||||
// @ts-ignore allow everything here for edge test cases
|
||||
skey: senderId,
|
||||
content: {
|
||||
state,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue