matterbridge/bridge
Wim 7c773ebae0 Add support for editing messages across bridges. Currently mattermost/discord.
Our Message type has an extra ID field which contains the message ID of the specific bridge.
The Send() function has been modified to return a msg ID (after the message to that specific
bridge has been created).

There is a lru cache of 5000 entries (message IDs). All in memory, so editing messages
will only work for messages the bot has seen.

Currently we go out from the idea that every message ID is unique, so we don't keep
the ID separate for each bridge. (we do for each gateway though)

If there's a new message from a bridge, we put that message ID in the LRU cache as key
and the []*BrMsgID as value (this slice contains the message ID's of each bridge that
received the new message)

If there's a new message and this message ID already exists in the cache, it must be
an updated message. The value from the cache gets checked for each bridge and if there
is a message ID for this bridge, the ID will be added to the Message{} sent to that
bridge. If the bridge sees that the ID isn't empty, it'll know it has to update the
message with that specific ID instead of creating a new message.
2017-08-28 00:33:17 +02:00
..
api Modify Send() to return also a message id 2017-08-27 22:59:37 +02:00
config Add support for editing messages across bridges. Currently mattermost/discord. 2017-08-28 00:33:17 +02:00
discord Add support for editing messages across bridges. Currently mattermost/discord. 2017-08-28 00:33:17 +02:00
gitter Modify Send() to return also a message id 2017-08-27 22:59:37 +02:00
irc Modify Send() to return also a message id 2017-08-27 22:59:37 +02:00
matrix Modify Send() to return also a message id 2017-08-27 22:59:37 +02:00
mattermost Add support for editing messages across bridges. Currently mattermost/discord. 2017-08-28 00:33:17 +02:00
rocketchat Modify Send() to return also a message id 2017-08-27 22:59:37 +02:00
slack Modify Send() to return also a message id 2017-08-27 22:59:37 +02:00
steam Modify Send() to return also a message id 2017-08-27 22:59:37 +02:00
telegram Modify Send() to return also a message id 2017-08-27 22:59:37 +02:00
xmpp Modify Send() to return also a message id 2017-08-27 22:59:37 +02:00
bridge.go Modify Send() to return also a message id 2017-08-27 22:59:37 +02:00