williamhorning / bolt

a cross-platform chat bot connecting your communities
MIT License
36 stars 4 forks source link

Matrix bridge #46

Closed austinhuang0131 closed 8 months ago

austinhuang0131 commented 9 months ago

gotta get it out of proof of concept

austinhuang0131 commented 9 months ago

remind me to cherrypick later

austinhuang0131 commented 9 months ago

fair warning: i will have to let coreToMessage return a list of messages because matrix doesn't allow more than 1 attachments per message, or attachments with text

williamhorning commented 9 months ago

fair warning: i will have to let coreToMessage return a list of messages because matrix doesn't allow more than 1 attachments per message, or attachments with text

that should be fine and isn't out of the ordinary, bolt-guilded does that to allow for file uploads (at least on the 0.4.x-deno branch). also, you can split those functions into their own file if you want to

remind me to cherrypick later

cherry pick the stuff outside of bolt-matrix pls

williamhorning commented 8 months ago

jsyk 0.5.5 was merged (see #44) so there're a few merge conflicts and public api changed but i can fix those for you if you'd like

williamhorning commented 8 months ago

see austinhuang0131/bolt#1

williamhorning commented 8 months ago

thats not quite what i wanted to do, whoops

williamhorning commented 8 months ago

i couldn't actually redo this in a sane way so i guess ill try to find a way to implement embeds and stuff or you could make a pr

austinhuang0131 commented 8 months ago

to matrix

in principle embeds is just converting to some html that looks similar. for allowed tags see https://spec.matrix.org/v1.10/client-server-api/#mroommessage-msgtypes

attachments would be more complicated since it requires uploading first, then attaching the mxc to the message. for custom emotes it'd also need to work the same way, but you'll need to use some db to store emoji-to-mxc mappings.

from matrix

html? good luck converting that

images? use the download url on the homeserver

r3k2 commented 8 months ago

I think when you merge by mistake you closed the tied issues :) I saw the email and was all happy! Only to come here and see it was a mistake :D :D cheers.