Commit Graph

37 Commits

Author SHA1 Message Date
Tulir Asokan
cf5384d908 Merge remote-tracking branch 'beeper/main' 2022-05-21 00:13:33 +03:00
Tulir Asokan
b8990c1898 Move to mautrix 2022-05-20 16:37:41 +03:00
Gary Kramlich
1a660806cb Fix a crash caused uncached open graphs previews
If the discord open graph stuff has a cached preview it'll pass it along on the
initial MessageCreate message. However, if it doesn't, it'll later send a
MessageUpdate with the new embed and a message that doesn't have an author set
as it's coming from the server.
2022-05-02 12:40:19 -05:00
Gary Kramlich
fe94078194 Avoid a null pointer deference 2022-05-02 11:31:14 -05:00
Gary Kramlich
7d9826fc2d Make sure we use the configured format string on room name updates
Refs #37
2022-05-02 09:44:12 -05:00
Gary Kramlich
3a1cb2fc78 Make sure we've acquired the room lock before checking the mxid 2022-05-02 09:29:38 -05:00
Gary Kramlich
59ea003f51 Properly handle group dm name updates.
Refs #37
2022-04-29 07:32:28 -05:00
Gary Kramlich
fc51c6e94e Sync puppets when they send a message
Fixes #30, Fixes #34
2022-04-27 13:48:36 -05:00
Gary Kramlich
c5f58afe71 End to bridge encryption implementation
So far this is passing my basic tests, but could use some testing from people
that are much more familiar with how this is supposed to work.

Refs #27
2022-04-27 12:43:12 -05:00
Gary Kramlich
145c0cc2cb Wire up replies.
Refs #29
2022-04-22 09:58:36 -05:00
Gary Kramlich
58aed46f13 Fix an issue when trying to create a matrix room
It doesn't make sense to create a matrix room for an edit/redaction/reaction
if we don't have the original message. Also we can't as we don't always have
all of the information. So now we don't try to create the room unless it's a
message being created.
2022-04-22 07:23:13 -05:00
Gary Kramlich
28d2e6fe38 Fix message editing from double puppets 2022-04-20 06:10:26 -05:00
Gary Kramlich
47463fa220 Fix reactions from double puppets.
Fixes #31
2022-04-20 05:29:38 -05:00
Gary Kramlich
be1acdde09 Implement redactions for guild messages.
Fixes #31
2022-04-18 16:54:07 -05:00
Gary Kramlich
b66556ad99 Add provisioning api for bridging guilds
This isn't exactly the same as the puppet bridge, basically it removes the
puppetID from the url and just works against the logged in user.

There is a known errata right now where some times all channels aren't left
when unbridging a guild. I figured it's more important to get some more testing
on this while I try to figure that out in the mean time.

Also when you call /guilds/:guildID/joinentire, it joins each channel serially.
I tried to make this concurrent but I maxed out the rate limit. We can do this
in the future, but again, rather get this into everyone's hands sooner rather
than later. I also did the same thing with unbridge and had to revert for the
same reasons.

Refs #8
2022-04-14 12:03:44 -05:00
Gary Kramlich
3629d7807c Implement channel name formatting and handle channel updates 2022-04-11 11:35:35 -05:00
Gary Kramlich
f39226c665 Fix double puppeting.
This was caused by some early attempts at not replaying messages. That was
fixed by tracking messages explicitly but these early returns with no logging
were never removed.

Fixes #23
2022-04-06 05:36:26 -05:00
Gary Kramlich
91a08dfd15 Add some additional checks for a portal creation
Refs #15
2022-02-28 04:52:51 -06:00
Gary Kramlich
dc3bdc2cec Double puppet support 2022-02-27 22:46:11 -06:00
Gary Kramlich
a51b1074ba Add support for custom emoji in reactions.
This seems to be working correctly, but element-desktop isn't rendering them,
not sure if that's expected or not.

Closes #4
2022-02-19 10:14:43 -06:00
Gary Kramlich
1c2dc8e9da Implement attachments for Matrix -> Discord 2022-02-19 07:37:12 -06:00
Gary Kramlich
7f99dc4a9e Implement attachments for Discord -> Matrix 2022-02-19 06:20:07 -06:00
Gary Kramlich
210fdda2fc Fix a crash when discord doesn't send an author 2022-02-11 03:56:52 -06:00
Gary Kramlich
c2e1c35dca Add support for edited messages from discord 2022-02-11 02:43:54 -06:00
Gary Kramlich
11bd655027 Implement message editing from the matrix side 2022-02-10 16:09:54 -06:00
Gary Kramlich
3e9f927ed4 Add support for deleting messages from discord 2022-02-08 05:18:25 -06:00
Gary Kramlich
8380c4b1b0 Finish up reaction removals from both sides
Also implement redactions on the matrix side
2022-02-08 03:51:29 -06:00
Gary Kramlich
9d13905a77 Add the db for reactions and removals from discord 2022-02-07 16:42:58 -06:00
Gary Kramlich
33c3cc998e implement reactions from the discord side 2022-02-07 05:00:40 -06:00
Gary Kramlich
3efe242d70 Implement reactions from the matrix side 2022-02-06 22:20:13 -06:00
Gary Kramlich
312018173f Store the message map 2022-02-06 19:08:30 -06:00
Gary Kramlich
6607e773a6 More state management for portals 2022-01-31 05:36:08 -06:00
Gary Kramlich
c1bb55d3cf Tons of works on dm's.
They mostly work including display names and avatars. However that's about all
they do right now.
2022-01-31 04:53:21 -06:00
Gary Kramlich
f20d204dd7 Remove some unnecessary logging messages 2022-01-27 12:29:11 -06:00
Gary Kramlich
680f7bdbea A ton of work getting towards dms.
This commit also points to my fork of discordgo which makes it look like the
official client which is the only way to get the actually contents of a dm
when not authorized as a bot.
2022-01-25 23:22:20 -06:00
Gary Kramlich
2279916d9c Implement the command parser
Right now this just supports help and version, but will be getting new commands
shortly.
2021-12-30 15:08:41 -06:00
Gary Kramlich
456a15ba56 Initial bot functionality
* The bot now properly joins the management room
* The management room is persisted in the database
* Welcome/help messages are sent in the management room
2021-12-30 09:33:06 -06:00