Merge branch 'travis/go-neb'

This commit is contained in:
Travis Ralston 2017-10-08 19:51:34 -06:00
commit 48070505c9
15 changed files with 68 additions and 18 deletions

View File

@ -64,6 +64,10 @@ Dimension is now available on the port/host you configured.
Dimension uses unstable and undocumented parts of Riot and can sometimes be a bit difficult to set up. If you're running into issues, check the solutions below. If you're still having issues, come by [#dimension:t2bot.io](https://matrix.to/#/#dimension:t2bot.io) and we can help you out.
## Setting up integrations (including custom)
See the INTEGRATIONS.md file in this repository.
## "Could not contact integrations server"
1. **Check that federation is enabled and working on your homeserver.** Even in a private, or non-federated environment, the federation API still needs to be accessible. If federation is a major concern, limit the servers that can use the API by IP or install Dimension on the same server as your homeserver, only exposing federation to localhost.

View File

@ -0,0 +1,7 @@
# All this configuration does is make "Custom Widget" available in the UI
type: "widget"
integrationType: "customwidget"
enabled: true
name: "Custom Widgets"
about: "A webpage embedded in the room."
avatar: "img/avatars/customwidget.png"

View File

@ -1,7 +0,0 @@
# This is an awkward configuration, but it basically adds the "Custom Widget" option to the UI
type: "widget"
integrationType: "customwidget"
enabled: true
name: "Custom Widgets"
about: "A webpage embedded in the room."
avatar: "img/avatars/customwidget.png"

View File

@ -5,6 +5,15 @@ userId: "@neb_giphy:matrix.org"
name: "Giphy"
about: "Use `!giphy query` to find an animated GIF on demand"
avatar: "img/avatars/giphy.png"
# This integration can be hosted in one of two ways: self-hosted or using vector.im's version.
# By default, vector.im's version is used, but you can host your own by uncommenting the `hosted`
# section below. Be sure to comment out or remove the `upstream` section below if you're self-hosting.
# Self-hosted bots are expected to auto-respond to invites.
upstream:
type: "vector"
id: "giphy"
id: "giphy"
#hosted:
# homeserverUrl: "https://t2bot.io"
# accessToken: "your_matrix_access_token_here"

View File

@ -5,4 +5,4 @@ name: "Github"
about: "Track changes to your projects and create new issues using `!github create`"
avatar: "img/avatars/github.png"
upstream:
type: "vector"
type: "vector"

View File

@ -5,6 +5,15 @@ userId: "@_neb_google:matrix.org"
name: "Google"
about: "Use `!google image query` to find an image from Google"
avatar: "img/avatars/google.png"
# This integration can be hosted in one of two ways: self-hosted or using vector.im's version.
# By default, vector.im's version is used, but you can host your own by uncommenting the `hosted`
# section below. Be sure to comment out or remove the `upstream` section below if you're self-hosting.
# Self-hosted bots are expected to auto-respond to invites.
upstream:
type: "vector"
id: "google"
id: "google"
#hosted:
# homeserverUrl: "https://t2bot.io"
# accessToken: "your_matrix_access_token_here"

View File

@ -5,6 +5,15 @@ userId: "@_neb_guggy:matrix.org"
name: "Guggy"
about: "Use `!guggy sentence` to create an animated GIF from a sentence"
avatar: "img/avatars/guggy.png"
# This integration can be hosted in one of two ways: self-hosted or using vector.im's version.
# By default, vector.im's version is used, but you can host your own by uncommenting the `hosted`
# section below. Be sure to comment out or remove the `upstream` section below if you're self-hosting.
# Self-hosted bots are expected to auto-respond to invites.
upstream:
type: "vector"
id: "guggy"
id: "guggy"
#hosted:
# homeserverUrl: "https://t2bot.io"
# accessToken: "your_matrix_access_token_here"

View File

@ -5,6 +5,15 @@ userId: "@_neb_imgur:matrix.org"
name: "Imgur"
about: "Use `!imgur query` to find an image from Imgur"
avatar: "img/avatars/imgur.png"
# This integration can be hosted in one of two ways: self-hosted or using vector.im's version.
# By default, vector.im's version is used, but you can host your own by uncommenting the `hosted`
# section below. Be sure to comment out or remove the `upstream` section below if you're self-hosting.
# Self-hosted bots are expected to auto-respond to invites.
upstream:
type: "vector"
id: "imgur"
id: "imgur"
#hosted:
# homeserverUrl: "https://t2bot.io"
# accessToken: "your_matrix_access_token_here"

View File

@ -7,4 +7,4 @@ avatar: "img/avatars/irc.png"
requirements:
joinRule: 'public'
upstream:
type: "vector"
type: "vector"

View File

@ -5,4 +5,4 @@ name: "RSS Bot"
about: "Tracks any Atom/RSS feed and sends new items into this room"
avatar: "img/avatars/rssbot.png"
upstream:
type: "vector"
type: "vector"

View File

@ -5,4 +5,4 @@ name: "Travis CI"
about: "Sends Travis CI build results into the room"
avatar: "img/avatars/travisci.png"
upstream:
type: "vector"
type: "vector"

View File

@ -5,6 +5,15 @@ userId: "@_neb_wikipedia:matrix.org"
name: "Wikipedia"
about: "Use `!wikipedia query` to find something from Wikipedia"
avatar: "img/avatars/wikipedia.png"
# This integration can be hosted in one of two ways: self-hosted or using vector.im's version.
# By default, vector.im's version is used, but you can host your own by uncommenting the `hosted`
# section below. Be sure to comment out or remove the `upstream` section below if you're self-hosting.
# Self-hosted bots are expected to auto-respond to invites.
upstream:
type: "vector"
id: "wikipedia"
id: "wikipedia"
#hosted:
# homeserverUrl: "https://t2bot.io"
# accessToken: "your_matrix_access_token_here"

View File

@ -22,10 +22,10 @@ for (var file of files) {
var fileName = file.replace("_development.yaml", "").replace("_production.yaml", "") + ".yaml";
if (!configs[fileName]) configs[fileName] = {};
configs[fileName]["alt"] = config.util.parseFile(path.join(searchPath, file));
configs[fileName]["alt"] = config.util.parseFile(path.join(searchPath, file)) || {};
} else {
if (!configs[file]) configs[file] = {};
configs[file]["defaults"] = config.util.parseFile(path.join(searchPath, file));
configs[file]["defaults"] = config.util.parseFile(path.join(searchPath, file)) || {};
}
}
@ -38,6 +38,7 @@ var byType = {};
for (var key of keys) {
log.info("Integrations", "Preparing " + key);
if (!configs[key].defaults) configs[key].defaults = {};
var merged = config.util.extendDeep(configs[key].defaults, configs[key].alt);
if (!merged['enabled']) {
log.warn("Integrations", "Integration " + key + " is not enabled - skipping");