Note: this is only an issue on Postgresql backed bridges, as nedb never properly uses a stored topic at all.
IRC topic changes (from non-virtual IRC users) are stored in the DataStore after reflecting the change in the Matrix room.
On subsequent topic changes, this topic is queried from the DataStore, to short-circuit the serviceTopicQueue function when the update is the same as the current topic:
|
private async serviceTopicQueue (item: TopicQueueItem) { |
|
const promises = item.matrixRooms.map((matrixRoom) => { |
|
if (matrixRoom.topic === item.topic) { |
|
item.req.log.info( |
|
"Topic of %s already set to '%s'", |
|
matrixRoom.getId(), |
|
item.topic |
|
); |
Topic changes by Matrix users are never stored in this same database, neither in MatrixHandler when they get bridged to IRC, nor when those topic changes come back through the IrcHandler (as it comes from a virtual user).
Given the following changes:
IRC user: Topic A
Matrix user: Topic B
IRC user: Topic A
The expected topic in the Matrix room would be Topic A, but because the database never stored Topic B, it still thinks the topic was Topic A, and ignores the last IRC update.
Note: this is only an issue on Postgresql backed bridges, as nedb never properly uses a stored topic at all.
IRC topic changes (from non-virtual IRC users) are stored in the DataStore after reflecting the change in the Matrix room.
On subsequent topic changes, this topic is queried from the DataStore, to short-circuit the
serviceTopicQueuefunction when the update is the same as the current topic:matrix-appservice-irc/src/bridge/IrcHandler.ts
Lines 441 to 448 in 062f3ac
Topic changes by Matrix users are never stored in this same database, neither in MatrixHandler when they get bridged to IRC, nor when those topic changes come back through the IrcHandler (as it comes from a virtual user).
Given the following changes:
IRC user: Topic A
Matrix user: Topic B
IRC user: Topic A
The expected topic in the Matrix room would be Topic A, but because the database never stored Topic B, it still thinks the topic was Topic A, and ignores the last IRC update.