Members
BridgeStore
Room storage format:
{
id: "matrix|remote|link_key", // customisable
matrix_id: "room_id",
remote_id: "remote_room_id",
matrix: { serialised matrix room info },
remote: { serialised remote room info },
data: { ... any additional info ... }
}
Each document can either represent a matrix room, a remote room, or
a mapping. They look like this:
MATRIX
{
id: "!room:id",
matrix_id: "!room:id",
matrix: { .. custom data eg name: "A happy place" .. }
}
REMOTE (e.g. IRC)
{
id: "irc.freenode.net_#channame",
remote_id: "irc.freenode.net_#channame",
remote: { .. custom data e.g. is_pm_room: true .. }
}
MAPPING
{
id: "!room:id__irc.freenode.net_#channame", // link key; customisable.
matrix_id: "!room:id",
remote_id: "irc.freenode.net_#channame",
matrix: { .. custom data .. },
remote: { .. custom data .. },
data: { .. custom data about the mapping ..}
}
A unique, non-sparse index can be set on the 'id' key, and non-unique,
sparse indexes can be set on matrix_id and remote_id to make mappings
quicker to compute.
- Source:
(constant) ConfigValidator
The room link validator is used to determine if a room can be bridged.
- Source:
Methods
defaultMessage(args, defaultMsg)
Ensures `args` contain an error message defaulting to `defaultMsg`.
Modifies `args`.
Parameters:
Name | Type | Description |
---|---|---|
args |
Array.<str> | The arguments to an Error object constructor. |
defaultMsg |
str | The error message to default to if there is none given. |
wrap()
Append the old error message to the new one and keep its stack trace.
Example:
throw wrap(e, HighLevelError, "This error is more specific");
Type Definitions
BridgeErrorReason
Type:
- "m.event_not_handled" | "m.event_too_old" | "m.internal_error" | "m.foreign_network_error" | "m.event_unknown"
- Source:
consumeCallback(erropt, data)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
err |
Error |
<optional> |
The error in case the data could not be retrieved. |
data |
object | The data associated with the consumed event. |
- Source: