new EventBridgeStore(db)
Construct a store suitable for event mapping information. Data is stored
as StoredEvents.
Parameters:
Name | Type | Description |
---|---|---|
db |
Datastore | The connected NEDB database instance |
- Source:
Methods
getEntryByMatrixId(roomId, eventId) → (nullable) {StoredEvent}
Get an existing event based on the provided matrix IDs.
Parameters:
Name | Type | Description |
---|---|---|
roomId |
string | The ID of the room. |
eventId |
string | The ID of the event. |
- Source:
Returns:
A promise which resolves to the StoredEvent or null.
- Type
- StoredEvent
getEntryByRemoteId(roomId, eventId) → (nullable) {StoredEvent}
Get an existing event based on the provided remote IDs.
Parameters:
Name | Type | Description |
---|---|---|
roomId |
string | The ID of the room. |
eventId |
string | The ID of the event. |
- Source:
Returns:
A promise which resolves to the StoredEvent or null.
- Type
- StoredEvent
removeEvent(event) → {Promise}
Remove entries based on the event data.
Parameters:
Name | Type | Description |
---|---|---|
event |
StoredEvent | The event to remove. |
- Source:
Returns:
- Type
- Promise
removeEventByMatrixId(roomId, eventId) → {Promise}
Remove entries based on the matrix IDs.
Parameters:
Name | Type | Description |
---|---|---|
roomId |
string | The ID of the room. |
eventId |
string | The ID of the event. |
- Source:
Returns:
- Type
- Promise
removeEventByRemoteId(roomId, eventId) → {Promise}
Remove entries based on the matrix IDs.
Parameters:
Name | Type | Description |
---|---|---|
roomId |
string | The ID of the room. |
eventId |
string | The ID of the event. |
- Source:
Returns:
- Type
- Promise
upsertEvent(event) → {Promise}
Insert an event, clobbering based on the ID of the StoredEvent.
Parameters:
Name | Type | Description |
---|---|---|
event |
StoredEvent |
- Source:
Returns:
- Type
- Promise