Skip to content
Extraits de code Groupes Projets
Valider 1b373c11 rédigé par Andrew Morgan's avatar Andrew Morgan
Parcourir les fichiers

Auto-create _matrix webhook in channel.

parent 1f5ad1e1
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -194,6 +194,10 @@ export class DiscordBot {
if (botUser) {
const webhooks = await chan.fetchWebhooks();
hook = webhooks.filterArray((h) => h.name === "_matrix").pop();
// Create a new webhook if none already exists
if (!hook) {
hook = await chan.createWebhook("_matrix", "", "Matrix Bridge: Allow rich user messages");
}
}
try {
if (!botUser) {
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter