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 1 year ago

gabrc52 commented 1 year ago

Mentions should still use matrix.to links

gabrc52 commented 1 year ago

Filed upstream issue Element Web # 26002

gabrc52 commented 1 year 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 1 year 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 1 year 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 1 year ago

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

gabrc52 commented 1 year ago

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

gabrc52 commented 1 year ago

image

aaaaaaaa

gabrc52 commented 1 year ago

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