* Check for user logins as well as fetching a ghost. This fixes
mentioning other Matrix users (when split portals are off), or
yourself.
* Escape display names.
* Gracefully fail when failing to locate any useful information.
* The split_portals config option is finally respected.
* This should prevent future room duplication when migrating from the
pre-bridgev2 version of the bridge, as we'll finally address guild
channels properly (that is, without a Receiver set, unless
split_portals is true).
In the same vein as mautrix-whatsapp, -slack and others, do not make
assumptions about how the ID is represented in the connector code. Let
the discordid package be entirely responsible.
For each guild specified in the config, create a space and bridge all
contained text channels that the user has permissions to view.
* Finally add a custom config struct where we accept a list of guild IDs
to bridge. This is intended to be temporary as we flesh out the proper
interfaces for managing which guilds to bridge.
* Defined a custom meta type for portals that holds the containing guild
ID of the channel (if any).
* Transferred the responsibility of building a channel's ChatInfo and
ChatMemberList to the DiscordChatResync event itself.
* Created a separate discordid package to avoid import cycles.
* Implemented attachment bridging. We still need to implement direct
media, but this will do for now.
* Corrected how encrypted files (e.g. embed images and attachments) were
bridged. Previously, the URL field would be empty.
Still a lot of missing pieces. Thoughts:
* Mentions to roles and custom emoji are not rendered properly. We need
to maintain our own DB.
* We might not need the "attachments" leaf package anymore? It's just
there to avoid an import cycle.
Bridging actual events (i.e. wiring up discordgo's event handlers) is
probably next.