Commit Graph

805 Commits (cc36ebf1c9191a6107637b26bd3dbc802f91eb4a)

Author SHA1 Message Date
Alexander cc36ebf1c9
Add UseFullName option (telegram) (#1777) 3 years ago
Wim 952221d3b9 Fix linting (whatsapp) 3 years ago
Wim 496d5b4ec7 Add whatsappmulti buildflag for whatsapp with multidevice support (whatsapp) 3 years ago
Wim d64eed49bc Fix linting (whatsapp) 3 years ago
Wim fffa29c2f3 Fix channel in video/audio/image/document handling (whatsapp) 3 years ago
Wim 4da1444ffc Check for Conversation on receiving messages (whatsapp) 3 years ago
Wim 21c4e56d16 Use Conversation instead of ExtendedTextMessage (whatsapp) 3 years ago
Wim 320c996a21 Refactor login logic (whatsapp) 3 years ago
Wim 69c74be7bb Add busy_timeout which fixes SQLITE_BUSY errors (whatsapp) 3 years ago
Wim 1b9877fda4 Fetch avatars synchronous (whatsapp) 3 years ago
Wim 0205a67309 Refactor JoinChannel (whatsapp) 3 years ago
Wim e7b193788a Rewrite whatsapp bridge to use whatsmeow 3 years ago
Wim 17da95b094
Remove go replace by fork (matrix) (#1771) 3 years ago
Wim f0f801402d
Refactor utf-8 conversion (irc) (#1767) 3 years ago
Sebastian P 663850a2b8
Implement a workaround to signal Opus support (mumble) (#1764)
* Mumble: Implement a workaround to signal Opus support without pulling in the CGO gopus dependency.

* mumble: lowercase error messages

* mumble: Add link to #1750 in bridge/mumble/codec.go
3 years ago
ValdikSS c51753cab1
Fix for complex-formatted Telegram text (#1765)
* Telegram: handle entities before everything

* Telegram: use runes for text entities

* Telegram: use proper offset and runes for links

* Telegram: put newline after backticks for pre

* Telegram: use utf16 for entity processing
3 years ago
Wim c30e90ff3f
Fix panic in irc. Closes #1751 (#1760) 3 years ago
Wim e4c0ca0f48
Switch to discordgo upstream again (#1759)
* Switch to upstream discordgo again

* Fix discord api changes
3 years ago
ValdikSS 9c203327c0
Fix Telegram channel title in forwards (#1753)
Forward from channels requires different handling than forward from the regular users.
This patch fixes the issue: it prints channel title instead of "forwarded from unknown".
3 years ago
Jan Martin Reckel ccb5b1d075
Fix Telegram Problem (unforwarded formatting and skipping of linebreaks) (#1749)
* Change bridge/telegram/handlers.go

Comment out the removing of empty lines
add support for bold, italic and striked telegram messages

* Implement Telegram MessageEntities correctly

* Apply gofmt

Co-authored-by: Jan Martin Reckel <jan-martin.reckel@s2017.tu-chemnitz.de>
Co-authored-by: Wim <wim@42.be>
3 years ago
Wim 2a3f475ff5
Make EditSuffix option actually work (whatsapp). Fixes #1510 (#1728)
To keep it backwards compatible we keep the "(edited)" message when no
editsuffix is configured.
3 years ago
Wim 7288f71201
Make HTMLDisable work correct (matrix) (#1716) 3 years ago
Wim 9c43eff753
Add support for using ID in channel config (mattermost) (#1715) 3 years ago
Wim c8d7fdeedc
Add UseUsername option (mattermost). Fixes #1665 (#1714) 3 years ago
Wim c211152e23
Add more debug options for discord (#1712)
debuglevel=1 dumps every received discord event
debuglevel=2 dumps every discord event we are sending to discord (also
logs sensitive information)
3 years ago
Wim c3644c8d3b
Add support for client certificate (irc) (#1710)
Supports https://libera.chat/guides/certfp.html
3 years ago
Wim 6438a3dba3
Add support for deleting files from slack to discord. Fixes #1705 (#1709)
We create a new event EventFileDelete which will be used to delete
specific uploaded files using the Extra["file"] in the config.Message.

We also add a new NativeID key to the FileInfo struct which will contain
the native file ID of the sending bridge.

When a new file is added to the config.Message.Extra["file"] map, now
the bridge native file ID should be added here.

When the receiving bridge receives such a message, it should keep an
internal mapping of NativeID <> bridge fileid/message id. In the case of
discord we map it to the resulted discord message ID after uploading it.

Now when a bridge deletes a file, it should send a EventFileDelete and
setting the ID to the native file ID of the bridge.

When the receiving bridge will get this event it'll look into the
NativeID <> bridge id mapping to find their internal ID and use it to
delete the specific file on their side.

For now this is implemented for slack to discord but this will be add to
other bridges where useful.
3 years ago
Wim 4b226a6a63
Add support for sender_chat (telegram) (#1677)
* Add support for sender_chat (telegram)

Fixes #1654
https://core.telegram.org/bots/api#december-7-2021

* Add debuglevel option

Add `debuglevel=1` in telegram config to increase debug
3 years ago
Ivan Zuev 4801850013
Add Telegram Bot Command /chatId (telegram) (#1703)
* feat(telegram): command to get chat id

* Gofumpt

Co-authored-by: Ivan Zuev <i-zuev@yandex-team.ru>
Co-authored-by: Wim <wim@42.be>
3 years ago
Ivan Zuev 6a7412bf2b
Increase batch size for conversation.list api method (slack) (#1700)
Co-authored-by: Ivan Zuev <i-zuev@yandex-team.ru>
3 years ago
Wim 2bcad846c0
Add more ignore debug messages (mattermost) (#1678) 3 years ago
Wim 15ad0165fc
Log eventtype in debug (mattermost) (#1676) 3 years ago
Wim 2e8ab11978
Use current parentID if rootId is not set (mattermost) (#1675) 3 years ago
vpzomtrrfrt 9a8ce9b17e
Reply support for Matrix (#1664)
* Post replies to matrix

* Handle replies from matrix

* Include protocol in canonical ID return

* fmt
3 years ago
Daniil Suvorov 16ab4c6fed
Remove GroupID (vk) (#1668) 3 years ago
Janet Blackquill dbedc99421
Add support for Harmony (#1656)
Harmony is a relatively new (1,5yo) chat protocol with a small community.
This introduces support for Harmony into Matterbridge, using the functionality
specifically designed for bridge bots. The implementation is a modest 200 lines
of code.
3 years ago
Soloam ae2ad824a9
Add comments to messages (telegram) (#1652)
* Add's comments to message in telegram messages

This is a change to handle comments in telegram messages!

Some messages in telegram have comments added to the message! This normally is the description in images or links. This changes appends the comment to the message if available.

This should fix the issue in #1649

* [fix] discord: send comments in extras

Co-authored-by: Wim <wim@42.be>
3 years ago
Wim 02e3d7852b
Update telegram-bot-api to v5 (#1660) 3 years ago
Wim 658bdd9faa
Fix telegram/handlers.go linting (#1658) 3 years ago
Dan Walmsley b275efaeff
Add support for code blocks in telegram (#1650)
* handle code blocks in telegram.

* support multi-line code blocks.

* remove import.

* handle code blocks in middle of normal text.

* support multiple code blocks in same message.
3 years ago
Santtu Lakkala df4d76e466
Allow binding to IP on IRC (#1640)
Add configuration option "Bind" that is passed on to girc, allowing
to choose which IP address to use on systems that have multiple ones.
3 years ago
Polynomdivision 5e1be8e558
Do not fail on no avatar data (xmpp) #1529 (#1627)
* Detect errors when working with AvatarData

* Remove not neccessary line

Co-authored-by: Wim <wim@42.be>
3 years ago
Wim c4fe462d11
Use a new msgID when replacing messages (xmpp). Fixes #1584 (#1623) 3 years ago
Wim b1f403165d
Fix panic in msteams. Fixes #1588 (#1622) 3 years ago
Wim 46e4317b77
Keep the logger on a disabled bridge. Fixes #1616 (#1621) 3 years ago
Alex Vandiver e3ffbcadd8
Add better error handling on Zulip (#1589)
* zulip: Treat unknown errors with a 10-second backoff.

An unknown error (including an unauthorized error) would fall through
with no calls to time.Sleep, resulting in hammering the server as
quickly as possible.

Add a 10-second sleep in the default error case.  The heartbeat is
left with no explicit sleep, but all other codepaths now contain one.

* version: Move version information into a separate package.

This will allow it to be accessed by other sections of the code.

* zulip: Use the matterbridge version in the user-agent.

Co-authored-by: Wim <wim@42.be>
3 years ago
Iris Morelle 61bab22dde
Add UserName and RealName options for IRC (#1590)
This allows setting custom values for the IRC username/ident and real
name (gecos) fields at server registration time with gIRC.

Co-authored-by: Wim <wim@42.be>
3 years ago
Jonathan Walker (Keenan) b06a574cc5
Invalidate user in cache on user change event (#1604)
Co-authored-by: Wim <wim@42.be>
3 years ago
Wim b56f80b1b8 Add support for mattermost v6 3 years ago
Benau 53cafa9f3d
Convert .tgs with go libraries (and cgo) (telegram) (#1569)
This commit adds support for go/cgo tgs conversion when building with the -tags `cgo`
The default binaries are still "pure" go and uses the old way of converting.

* Move lottie_convert.py conversion code to its own file

* Add optional libtgsconverter

* Update vendor

* Apply suggestions from code review

* Update bridge/helper/libtgsconverter.go

Co-authored-by: Wim <wim@42.be>
3 years ago