Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discussion] Simplifying bridging of guilds, channels and bridging settings #458

Open
Sorunome opened this issue May 9, 2019 · 1 comment
Assignees
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements.

Comments

@Sorunome
Copy link
Collaborator

Sorunome commented May 9, 2019

This issue is to discuss / brainstorm ideas on how to simplify bridging of entire guilds and single channels only, and how do perform settings for these. Thus this is related to #433, #432, #397, #264, #207, #206, #141, #70

Mapping

A discord guild can be mapped to a matrix group. The matrix group ID would be +_discord_GUILDID:homeserver
A discord channel can be mapped to a matrix room. The matrix room ID would be #_discord_GUILDID_CHANID:homeserver

Guild

  • bridge settings
  • automatically bridge / unbridge channels as they get added / removed
  • add bridged channels to the matrix group
  • have a "sync" feature, which 1st: find all existing bridged channels which belong to the guild and add them to the guild mapping, 2nd: find all channels which can be bridged in the guild and bridge them with the #_discord_GUILDID_CHANID:homeserverroom ID, also adding them to the guild mapping
  • can be bridged with !discord bridgeGuild

Channel

  • bridge settings
  • can be bridged with !discord bridge
  • doesn't have to have a parent mapped guild (typically for rooms created with !discord bridge)

Bridge Settings

The idea is to have three level of bridge settings: global (config.yaml), guild and channel. If a field in channel is set to undefined then the value of the guild is used (if present), and if that is also undefined then go to the global defaults.

The values would be:

  • update_icon (bool): automatically update the room icon to the guild icon
  • update_name (bool): automatically update the room name
  • update_topic (bool): automatically update the room topic
  • room_name_pattern (string): pattern for the room name
  • guild_name_pattern (string): pattern for the guild name (only applies to guilds)

Defaults

The defaults on both guild and room level would be undefined for all, so that it falls back to the defaults set in the global config.yaml. Below soru outlines the defaults for the

bridgeSettings.room

These work a tad differently as they don't have a parent guild. The default parent guild would be ofc undefined. Typically you don't want things to auto-update here as you bridge already existing rooms
The default config would look like:

bridgeSettings:
    room:
        updateIcon: false
        updateName: false
        udpateTopic: false
        namePattern: "[Discord] :guild :name"

bridgeSettings.guild

These would be the default guild settings for if a guild is present. Typically these would be for rooms bridged with !discord bridgeGuild, and thus you want things like icon etc. to auto-sync

bridgeSettings:
    guild:
        updateIcon: false
        updateName: false
        udpateTopic: false
        roomNamePattern: "[Discord] :guild :name"
        guildNamePattern: "[Discord] :guild"

Setting them

You could set them with something like !discord set chan updateIcon true or get iwth !discord get chan updateIcon. A !discord get chan would dump all channel settings.

Thoughts

Currently you can just join a #_discord_GUILDID_CHANID:homeserver room and it'll auto-bridge that. With this soru would propose it'll only auto-bridge such channels with the GUILDID is one that is already bridged. This would also trigger a full guild sync as, if it needs to create such a room, it is an indication that the guild sync fell behind.
A new table for storing the mapping between guilds would need to be created.
The value if a room is provisioned or not is unneeded in the channel mapping table, instead we need a value if we have a parent guild.

Breaking behaviour

  • the way #_discord_GUILDID_CHANID:homeserver things are joined

If you have any questions / feedback / other ides, please share below!

@Half-Shot Half-Shot self-assigned this May 16, 2019
@jaller94 jaller94 added the T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements. label May 20, 2022
@Ryhon0
Copy link

Ryhon0 commented Jun 17, 2022

Guild groups (now called spaces) could also store the guild's emojis for clients that support them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements.
Projects
None yet
Development

No branches or pull requests

4 participants