* discord: add nosendjoinpart support
This allows the discord bridge to be configured with `nosendjoinpart`,
preventing discord-originating join/part messages from being send to
other bridged platforms.
* discord: Ignore incoming events for other guilds
Ignore all incoming discord events originating from Guild IDs other than
the one we have configured.
This is necessary because discord bots receive events for *all* discord
guilds that they are present in.
Fixes#1612
Discord message references have been designed in a way for this to
support cross-channel or even cross-guild references in the future.
This will ensure the ParentID is *not* set when the message refers to a
message that was sent in a different channel.
Webhooks don't support the threading yet, so this is token only.
In discord you can reply on each message of a thread, but this is not possible in mattermost (so some changes added there to make sure we always answer on the rootID of the thread).
Also needs some more testing with slack.
update : It now also uses the token when replying to a thread (even if webhooks are enabled), until webhooks have support for threads.
* move stripCustomoji logic to default Tengo script
Removing the image ID from the message (without any possibility of recovering it later) is a loss of valuable data that prevents users from giving support to custom emoji via Tengo scripts.
* bugfix - do send colors to other irc bridges
"if we're not sending to an irc bridge we strip the IRC colors"
Co-authored-by: c0ncord <59654954+c0ncord@users.noreply.github.com>