mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-25 06:40:26 +00:00
use notification type in url params
This commit is contained in:
@@ -12,10 +12,7 @@ import {
|
||||
IndexedDBStore,
|
||||
MemoryStore,
|
||||
Preset,
|
||||
type RoomMember,
|
||||
UNSTABLE_ELEMENT_FUNCTIONAL_USERS,
|
||||
Visibility,
|
||||
Direction,
|
||||
} from "matrix-js-sdk";
|
||||
import { type ISyncStateData, type SyncState } from "matrix-js-sdk/lib/sync";
|
||||
import { logger } from "matrix-js-sdk/lib/logger";
|
||||
@@ -339,27 +336,6 @@ export function getRelativeRoomUrl(
|
||||
return `/room/#${roomPart}?${generateUrlSearchParams(roomId, encryptionSystem, viaServers).toString()}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all room members that are non-functional (all actual room members).
|
||||
* A functional user is a user that is not a real user, but a bot, assistant, etc.
|
||||
*/
|
||||
export function getJoinedNonFunctionalMembers(room: Room): RoomMember[] {
|
||||
const functionalUsersStateEvent = room
|
||||
.getLiveTimeline()
|
||||
.getState(Direction.Forward)
|
||||
?.getStateEvents(UNSTABLE_ELEMENT_FUNCTIONAL_USERS.name, "");
|
||||
|
||||
const functionalMembers = Array.isArray(
|
||||
functionalUsersStateEvent?.getContent().service_members,
|
||||
)
|
||||
? functionalUsersStateEvent.getContent().service_members
|
||||
: [];
|
||||
|
||||
return room
|
||||
.getJoinedMembers()
|
||||
.filter((m) => !functionalMembers.includes(m.userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a network operation with retries on ConnectionError.
|
||||
* If the error is not retryable, or the max number of retries is reached, the error is rethrown.
|
||||
|
||||
Reference in New Issue
Block a user