forked from Ivasoft/mattermost-mobile
MM-45745 - Calls channel info screen options (#6502)
* implement calls_channel_info; joinCall refactoring * i18n * Start/Join call as top button; movable copy channel link button * MM-45971 - Calls v2 PR comments (#6514) * don't clobber config if api req failed * combine two loops into one * update dependencies * fetch user model on user connected * fix state exports; spacing; unneeded field in ServerConfig type * remove useless return in websocket handler * constant sorting * move microphone permission request to leave_and_join_alert * ServerConfig -> ServerCallsConfig * console.log -> logError * ternary -> Platform.select * merge conflicts * add destructive options to OptionBox; require DismissChannelInfo fn * add CopyLink option to quick actions list * showSnackBar on link copied * adjust quick_options_height * Screens.Call * fix CopyLink spacing * fix observeUsersById, observe needed columns; fix JoinCallBanner mount * optimized observables; bug fixes * remove unneeded `return null` * PR comments * readable-stream -> 3.6.0 * merge conflicts * PR comments
This commit is contained in:
committed by
GitHub
parent
bae5477b35
commit
17dbfdcb99
@@ -56,10 +56,6 @@ export const queryUsersById = (database: Database, userIds: string[]) => {
|
||||
return database.get<UserModel>(USER).query(Q.where('id', Q.oneOf(userIds)));
|
||||
};
|
||||
|
||||
export const observeUsersById = (database: Database, userIds: string[]) => {
|
||||
return queryUsersById(database, userIds).observe();
|
||||
};
|
||||
|
||||
export const queryUsersByUsername = (database: Database, usernames: string[]) => {
|
||||
return database.get<UserModel>(USER).query(Q.where('username', Q.oneOf(usernames)));
|
||||
};
|
||||
@@ -112,8 +108,8 @@ export const observeUserIsTeamAdmin = (database: Database, userId: string, teamI
|
||||
);
|
||||
};
|
||||
|
||||
export const observeUserIsChannelAdmin = (database: Database, userId: string, teamId: string) => {
|
||||
const id = `${teamId}-${userId}`;
|
||||
export const observeUserIsChannelAdmin = (database: Database, userId: string, channelId: string) => {
|
||||
const id = `${channelId}-${userId}`;
|
||||
return database.get<ChannelMembershipModel>(CHANNEL_MEMBERSHIP).query(
|
||||
Q.where('id', Q.eq(id)),
|
||||
).observe().pipe(
|
||||
|
||||
Reference in New Issue
Block a user