Skip to content

Commit

Permalink
Merge pull request #4745 from nextcloud/fix/4719/bridge-channel-keys
Browse files Browse the repository at this point in the history
Fix MsTeams and Steam Matterbridge config
  • Loading branch information
nickvergessen authored Dec 15, 2020
2 parents 45bafea + 5372c12 commit 4111ee0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
16 changes: 4 additions & 12 deletions lib/MatterbridgeManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -496,19 +496,11 @@ private function generateConfig(array $bridge): string {

$content .= '[[gateway.inout]]' . "\n";
$content .= sprintf(' account = "%s.%s"', $type, $k) . "\n";
if (in_array($type, ['zulip', 'discord', 'xmpp', 'irc', 'slack', 'rocketchat', 'mattermost', 'matrix', 'nctalk'])) {
$content .= sprintf(' channel = "%s"', $part['channel']) . "\n";
if ($type === 'irc' && $part['channelpassword']) {
$content .= sprintf(' options = { key = "%s" }', $part['channelpassword']) . "\n";
}
$content .= "\n";
} elseif ($type === 'msteams') {
$content .= sprintf(' threadId = "%s"', $part['threadid']) . "\n\n";
} elseif ($type === 'telegram') {
$content .= sprintf(' channel = "%s"', $part['channel']) . "\n\n";
} elseif ($type === 'steam') {
$content .= sprintf(' chatid = "%s"', $part['chatid']) . "\n\n";
$content .= sprintf(' channel = "%s"', $part['channel']) . "\n";
if ($type === 'irc' && $part['channelpassword']) {
$content .= sprintf(' options = { key = "%s" }', $part['channelpassword']) . "\n";
}
$content .= "\n";
}

return $content;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ export default {
placeholder: t('spreed', 'Password'),
icon: 'icon-category-auth',
},
chatid: {
channel: {
type: 'text',
placeholder: t('spreed', 'Chat ID'),
icon: 'icon-group',
Expand Down Expand Up @@ -399,7 +399,7 @@ export default {
placeholder: t('spreed', 'Team ID'),
icon: 'icon-category-auth',
},
threadid: {
channel: {
type: 'text',
placeholder: t('spreed', 'Thread ID'),
icon: 'icon-group',
Expand Down

0 comments on commit 4111ee0

Please sign in to comment.