sipb / uplink

SIPB's integrated chatroom project
GNU Affero General Public License v3.0
6 stars 1 forks source link

Mentions don't look good on other Element instances with different config.json / mobile #78

Open gabrc52 opened 11 months ago

gabrc52 commented 11 months ago

Mentions should still use matrix.to links

gabrc52 commented 11 months ago

Filed upstream issue Element Web # 26002

gabrc52 commented 11 months ago

See https://github.com/matrix-org/matrix-react-sdk/pull/1225/files possibly as an initial place to find where to update the code if you wish to do a PR

(can ctrl+f similar keywords)

gabrc52 commented 11 months ago
function getPermalinkConstructor(): PermalinkConstructor {
    const elementPrefix = SdkConfig.get("permalink_prefix");
    if (elementPrefix && elementPrefix !== matrixtoBaseUrl) {
        return new ElementPermalinkConstructor(elementPrefix);
    }

    return new MatrixToPermalinkConstructor();
}

on src/utils/permalinks/Permalinks.ts

gabrc52 commented 11 months ago

https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/autocomplete/UserProvider.tsx#L135C27-L135C44

calls the makeUserPermalink function which calls getPermalinkConstructor

gabrc52 commented 11 months ago

Might be in MessageComposer.tsx. The href there didn't help...

gabrc52 commented 11 months ago

Going to ./src/components/views/rooms/wysiwyg_composer/utils/message.ts

gabrc52 commented 11 months ago

image

aaaaaaaa

gabrc52 commented 11 months ago

Well permalinkCreator is passed to message.ts but it only used to add the reply fallback to the m.relates_to