mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-12 18:20:28 +03:00
Fix authenticated media download (#1947)
* remove dead function * fix media download in room timeline * authenticate remaining media endpoints
This commit is contained in:
parent
f2c31d29a2
commit
03cc25eec0
13 changed files with 284 additions and 207 deletions
|
|
@ -18,11 +18,13 @@ import UserIC from '../../../../public/res/ic/outlined/user.svg';
|
|||
import { useRoomNavigate } from '../../hooks/useRoomNavigate';
|
||||
import { getDMRoomFor } from '../../utils/matrix';
|
||||
import { useMatrixClient } from '../../hooks/useMatrixClient';
|
||||
import { useMediaAuthentication } from '../../hooks/useMediaAuthentication';
|
||||
|
||||
function InviteUser({ isOpen, roomId, searchTerm, onRequestClose }) {
|
||||
const [isSearching, updateIsSearching] = useState(false);
|
||||
const [searchQuery, updateSearchQuery] = useState({});
|
||||
const [users, updateUsers] = useState([]);
|
||||
const useAuthentication = useMediaAuthentication();
|
||||
|
||||
const [procUsers, updateProcUsers] = useState(new Set()); // proc stands for processing.
|
||||
const [procUserError, updateUserProcError] = useState(new Map());
|
||||
|
|
@ -222,7 +224,15 @@ function InviteUser({ isOpen, roomId, searchTerm, onRequestClose }) {
|
|||
key={userId}
|
||||
avatarSrc={
|
||||
typeof user.avatar_url === 'string'
|
||||
? mx.mxcUrlToHttp(user.avatar_url, 42, 42, 'crop')
|
||||
? mx.mxcUrlToHttp(
|
||||
user.avatar_url,
|
||||
42,
|
||||
42,
|
||||
'crop',
|
||||
undefined,
|
||||
undefined,
|
||||
useAuthentication
|
||||
)
|
||||
: null
|
||||
}
|
||||
name={name}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue