Commit Graph

380 Commits

Author SHA1 Message Date
Gary Kramlich
7ec86340c3 Add commands for managing guild bridging
guilds status will list the guild names, their ids, and whether or not the
guild is bridged.

guilds bridge <guildID> will bridge the guild with the given ID. If you add the
--entire flag, it will create a portal for each channel on the guild.

guilds unbridge <guildID> will stop bridging the guild with the given ID and
remove all portals for that guild.

Refs #8
2022-04-14 12:44:33 -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
defcfad701 Update our dependencies 2022-04-07 14:25:52 -05:00
Gary Kramlich
8dda382ac3 Redact the qrcode when done.
The QRCode is only good for 2 minutes, so when we're done, it's done.

Fixes #24
2022-04-07 14:03:05 -05:00
Gary Kramlich
2a7fc8eabf Make sure to properly set NULL for portal.mxid if we don't have one.
When this gets set to empty string it causes primary key to fail and cascades
into other issues like the inability to deduplicate messages.

Refs #26
2022-04-07 13:46:51 -05:00
Gary Kramlich
a56864f924 Make some guild log messages a bit more informative 2022-04-07 13:22:23 -05:00
Gary Kramlich
4364804a9a Hide the guilds commands as they're not fully functional
Refs #25
2022-04-07 13:21:22 -05:00
Sumner Evans
06f7d64bdb ci: don't remove tagged container before tagging as latest 2022-04-06 22:55:01 -06:00
Sumner Evans
460e706ec0 ci: fix docker tagging when pushing to main 2022-04-06 22:50:26 -06:00
Sumner Evans
e53e278614 ci: fix commit branch gating 2022-04-06 22:42:53 -06: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
2285b5b9f2 Merge branch '19-ephemeral-events' into 'main'
ephemeral events: add support for MSC2409 ephemeral events

Closes #19

See merge request beeper/discord!4
2022-04-04 09:59:09 +00:00
Sumner Evans
317abae2ed ephemeral events: add support for MSC2409 ephemeral events
Closes #19
2022-04-01 18:50:46 -06:00
Gary Kramlich
9594e285c6 Merge branch 'bot-avatar-logging-fixes' into 'main'
bot: fix logging when updating avatar and display name

See merge request beeper/discord!3
2022-04-01 23:29:07 +00:00
Gary Kramlich
72f6681512 Merge branch 'sumner/bri-2662' into 'main'
Make mautrix-discord ready for deployment on Beeper infra

Closes #16

See merge request beeper/discord!1
2022-04-01 23:27:15 +00:00
Gary Kramlich
d88a7d518b Merge branch 'fix-postgresql-migrations' into 'main'
database: fixes for postgresql

See merge request beeper/discord!2
2022-04-01 23:26:29 +00:00
Sumner Evans
ff16cdf3f1 ci: add automatic builds 2022-04-01 16:38:35 -06:00
Sumner Evans
3540f8a5ca dockerfile: initialize 2022-04-01 16:38:35 -06:00
Sumner Evans
c22c71a831 config: add example config 2022-04-01 16:38:35 -06:00
Sumner Evans
504476c276 config: username template should be lowercase
See https://spec.matrix.org/v1.2/appendices/#user-identifiers
2022-04-01 16:38:35 -06:00
Sumner Evans
f256ff94f7 database/userquery: fix selects from user table 2022-04-01 16:36:55 -06:00
Sumner Evans
6bdeb55724 bot: fix logging when updating avatar and display name 2022-04-01 15:57:27 -06:00
Sumner Evans
4e7a81891f database/migrations: fix migration 07 for postgresql 2022-04-01 15:43:20 -06:00
Gary Kramlich
21fe76d5e4 Use the guild bridge setting to bridge messages.
Previously we just dropped all guild messages, now we check if the guildID is
set to bridge and if so we that it pass through, if not we just drop it.
2022-03-29 08:08:17 -05:00
Gary Kramlich
928a49b42d Keep track of guild states.
We don't currently bridge anything, but this just keeps everything in sync
with the discord server.
2022-03-29 07:10:16 -05:00
Gary Kramlich
d4355779a6 Update our dependencies 2022-03-16 20:53:12 -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
2db80efad5 remove some debug messages 2022-02-28 04:52:31 -06:00
Gary Kramlich
44443b4079 Fix an issue where additional users weren't being persisted 2022-02-28 00:32:19 -06:00
Gary Kramlich
dc3bdc2cec Double puppet support 2022-02-27 22:46:11 -06:00
Gary Kramlich
c6be694106 Update the database for custom puppets 2022-02-23 03:26:23 -06:00
Gary Kramlich
4b87ea1cc7 Add (dis|re)connect commands and provision api
Also fixed a number of data races.
2022-02-22 07:56:15 -06:00
Gary Kramlich
d883befee5 Basic provisioning api
Includes: login, logout, and ping.
2022-02-22 02:51:22 -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
6a688f01b7 Quote the user table table for postgres
Fixes #11
2022-02-14 16:46:42 -06:00
Gary Kramlich
c1bdbd80f6 Fix a typo codespell found 2022-02-11 04:35:55 -06:00
Gary Kramlich
e6208cafe7 Add a README.md 2022-02-11 04:35:30 -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
b6ee5bccc6 Update to the lastest rev of our discordgo fork
This was necessary so we can get the content type and description of attachments
2022-02-10 05:37:59 -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