cetirizine.meta

Issues/PRs archive for MTRNord/cetirizine
git clone git://archive.git.mtrnord.blog/MTRNord/cetirizine.meta.git
Log | Files | Refs

6.diff (962B)


      1 diff --git a/changelog.d/5.bugfix b/changelog.d/5.bugfix
      2 new file mode 100644
      3 index 0000000..a651d37
      4 --- /dev/null
      5 +++ b/changelog.d/5.bugfix
      6 @@ -0,0 +1 @@
      7 +Make sure that we always use the correct avatar url
      8 \ No newline at end of file
      9 diff --git a/src/app/sdk/client.ts b/src/app/sdk/client.ts
     10 index 75c99c4..88ffb7b 100644
     11 --- a/src/app/sdk/client.ts
     12 +++ b/src/app/sdk/client.ts
     13 @@ -408,7 +408,9 @@ export class MatrixClient extends EventEmitter {
     14              throw Error("Error fetching profile info. See console for error.");
     15          }
     16          const json = await resp.json() as IProfileInfo;
     17 -        json.avatar_url = json.avatar_url?.replace("mxc://", `${this.user.hostname}/_matrix/media/v3/download/`);
     18 +        if (json.avatar_url) {
     19 +            json.avatar_url = this.convertMXC(json.avatar_url);
     20 +        }
     21          this.profileInfo = json;
     22          const tx = this.database?.transaction('loginInfo', 'readwrite');
     23          await tx?.store.put({