8 Nov 2023 |
Puneet Nanda | I am still getting the same errors with matrix.org.
The strange thing is the same thing is implemented in react js webApp but we are not getting any params there like ?&=1699443071324. | 11:38:01 |
Ricardo Duarte | Can you show us the code that generated that request ? | 11:38:42 |
Puneet Nanda | import * as sdk from 'matrix-js-sdk'; const createClient = async () => { try { const clientOptions = { baseUrl: MATRIX_SERVER, }; matrixClient = sdk.createClient(clientOptions); console.log(matrixClient, 'matrix Client'); isCreated = true; return true; } catch (error) { console.error('Error while creating client:', error); return false; } };
const connect = async () => {
try {
if (!isCreated) {
await createClient();
}
await matrixClient.startClient({ initialSyncLimit: 100000 });
isConnected = true;
return isConnected;
} catch (error) {
console.error('Error while connecting:', error);
isConnected = false;
return isConnected; // Return false to indicate that the connection failed.
}
};
const checkSyncedClient = async (setClientSynced) => {
setTimeout(() => {
matrixClient.once('sync', function (state, prevState, res) {
if (state === 'PREPARED') {
console.log('account data prepared');
setClientSynced();
}
if (state === 'ERROR') {
checkSyncedClient(setClientSynced);
}
});
}, 2000);
};
I am using these methods initially to setup Matrix Client.
| 11:43:46 |
Ricardo Duarte | baseUrl: MATRIX_SERVER, <-- | 11:53:54 |
Ricardo Duarte | Can you show what's stored in this var ? | 11:54:00 |
Puneet Nanda | export const MATRIX_SERVER = "https://matrix.org/" | 11:58:55 |
Ricardo Duarte | Could you possibly try without the last / ? | 12:00:42 |
Puneet Nanda | I tried but got the same result. | 12:01:37 |
Ricardo Duarte | I'm out of ideas... 😕 | 12:05:02 |
9 Nov 2023 |
| A2 changed their display name from Asbjørn to A2. | 18:03:03 |
15 Nov 2023 |
| @bhuhhajjnf:matrix.org joined the room. | 05:17:49 |
| @bhuhhajjnf:matrix.org left the room. | 06:44:47 |
25 Nov 2023 |
| bobby123 joined the room. | 16:31:29 |
bobby123 | why can matrixClient .getUser(myUserId)!.avatarUrl; return null ? | 18:43:21 |
bobby123 | * why can matrixClient.getUser(myUserId)!.avatarUrl; return null ? | 18:43:27 |
Ricardo Duarte | If there's no avatar... .what should it return ? | 18:52:50 |
bobby123 | no I mean, if I'm logged in my avatar should be available no>? | 18:53:58 |
bobby123 | * no I mean, if I'm logged in my avatar should be available no? | 18:53:59 |
bobby123 | for some reason it keeps returning null | 18:54:04 |
bobby123 | oh ... | 18:54:08 |
bobby123 | I have no avatar :P | 18:54:11 |
bobby123 | my bad! | 18:54:13 |
Ricardo Duarte | I just died a little.. | 18:54:43 |
| bobby123 set a profile picture. | 18:54:44 |
bobby123 | In reply to @daedric:aguiarvieira.pt I just died a little.. I just wasted a few hours of my day :D | 18:54:57 |
| bobby123 changed their profile picture. | 23:55:12 |
30 Nov 2023 |
| @finlifin:matrix.org left the room. | 15:32:54 |
11 Dec 2023 |
| North joined the room. | 03:43:22 |
North | Guys, few questions, how do I make the bot decrypt and read messages? | 03:44:03 |
North | For some reason I try client._crypt.decryptEvent(message) and it seems to trigger an error saying | 03:45:16 |