Add an option to invite users to upgraded private rooms
The option doesn't show up on public room upgrades.
This commit is contained in:
parent
ac8afe6dd1
commit
f020929345
7 changed files with 234 additions and 75 deletions
|
@ -153,13 +153,8 @@ function _onStartDmFinished(shouldInvite, addrs) {
|
|||
}
|
||||
}
|
||||
|
||||
function _onRoomInviteFinished(roomId, shouldInvite, addrs) {
|
||||
if (!shouldInvite) return;
|
||||
|
||||
const addrTexts = addrs.map((addr) => addr.address);
|
||||
|
||||
// Invite new users to a room
|
||||
inviteMultipleToRoom(roomId, addrTexts).then((result) => {
|
||||
export function inviteUsersToRoom(roomId, userIds) {
|
||||
return inviteMultipleToRoom(roomId, userIds).then((result) => {
|
||||
const room = MatrixClientPeg.get().getRoom(roomId);
|
||||
return _showAnyInviteErrors(result.states, room, result.inviter);
|
||||
}).catch((err) => {
|
||||
|
@ -172,6 +167,15 @@ function _onRoomInviteFinished(roomId, shouldInvite, addrs) {
|
|||
});
|
||||
}
|
||||
|
||||
function _onRoomInviteFinished(roomId, shouldInvite, addrs) {
|
||||
if (!shouldInvite) return;
|
||||
|
||||
const addrTexts = addrs.map((addr) => addr.address);
|
||||
|
||||
// Invite new users to a room
|
||||
inviteUsersToRoom(roomId, addrTexts);
|
||||
}
|
||||
|
||||
// TODO: Immutable DMs replaces this
|
||||
function _isDmChat(addrTexts) {
|
||||
if (addrTexts.length === 1 && getAddressType(addrTexts[0]) === 'mx-user-id') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue