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
2ae56ad0ed
Fix an issue where the bot would think e2be dms were the management rooms
2022-05-02 11:31:51 -05:00
Gary Kramlich
fe94078194
Avoid a null pointer deference
2022-05-02 11:31:14 -05:00
Gary Kramlich
0afd95398b
Fix the help on guilds unbridge
2022-05-02 09:53:54 -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
218854a427
Update our dependencies
2022-04-29 01:28:51 -05:00
Sumner Evans
43f6d2eaa7
editorconfig: add
2022-04-27 22:03:01 -06:00
Gary Kramlich
bf5ba9360e
Merge branch 'fix-shared-rooms-query' into 'main'
...
sqlstatestore: fix query for FindSharedRooms
See merge request beeper/discord!6
2022-04-28 04:02:46 +00:00
Sumner Evans
fdb219bb82
sqlstatestore: fix query for FindSharedRooms
...
There were missing spaces in the string concatenation
2022-04-27 22:00:07 -06:00
Gary Kramlich
7630e8a7a9
Add the encryption section to example-config.yaml
2022-04-27 22:47:04 -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
8ce5af2fb5
Merge branch 'sumner/bri-2580' into 'main'
...
async media: add ability to upload media asynchronously
See merge request beeper/discord!5
2022-04-27 18:23:12 +00:00
Gary Kramlich
d788565d2b
Fix replies from the management room
...
This was accidentally broken when implementing e2be.
2022-04-27 13:16:11 -05:00
Sumner Evans
a695b045c8
async media: add ability to upload media asynchronously
...
Requires a homeserver with MSC2246 support
2022-04-27 11:50:28 -06: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
Sumner Evans
7b936700ee
ci: automatically update both STABLE and NIGHTLY on dev environment
2022-04-18 18:49:50 -06:00
Gary Kramlich
be1acdde09
Implement redactions for guild messages.
...
Fixes #31
2022-04-18 16:54:07 -05:00
Gary Kramlich
619dd9aef8
Fix a bug where guilds weren't being saved
...
During a refactor the guild.Upsert somehow got removed and I didn't notice it
because my test account was synced. So to avoid this in the future we output
the number of guilds the database knows, the number discord says we have and
then how many the database has after we purge guilds the user has left.
refs #8
2022-04-14 18:57:54 -05:00
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