Skip to main content

Patch middleware for EH Forwarder Bot, enhance functions.

Project description

Main Function

  • Telegram administrator can send messages
  • Automatically mark read on WeChat (received messages on telegram will mark read)
  • In a group, only one note is displayed when the note has the same name (or one is included by the other)
  • /update_info command adds WeChat group member information to telegram group description (supported)
  • Establish a database to save the tg group and WeChat chat / group name mapping. When there is no binding, try to find a group with the same name and automatically bind
  • Delete unnecessary messages when receiving pictures, videos, files, for example: sent a picture. [1]
  • Applet sharing adds "Applet:" title prefix to distinguish regular links
  • Use rm` to reply to the message sent by yourself (telegram message cannot be edited )

compatible version

EFB 2.0.0b22
ETM 2.0.0b30
EWS 2.0.0a32

Usage

The /update_info command will bind the current group to the WeChat chat one-to-one correspondence The /relate_group command binds the WeChat group to the current telegram group, and can be associated with multiple WeChat chats; repeated use will clear the previous binding relationship The /release_group command will delete all WeChat sessions bound to the telegram group

Add the following configuration under blueset.telegram/config.yaml, and send the public account message to the -12334557 group (view the id through the /info command)

tg_mp: -12334557 # telegram group id

Installation

pip3 install efb-patch-middleware

~/.ehforwarderbot/profiles/default/config.yaml file add to configuration enable middleware

master_channel: blueset.telegram
slave_channels:
- blueset.wechat
middlewares:
- patch.PatchMiddleware

Data Backup

Data is saved under .ehforwarderbot/profiles/default/patch.PatchMiddleware/tg_group.db

Difference between /update_info and /relate_group

/update_info is the original command of efb, which will update the WeChat session avatar and name to the tg group, and only supports binding a WeChat session. Now this command has been extended to synchronize the WeChat session name with the tg group ID. Binding one-to-one correspondence. After the link fails, replace the original failed link with the latest one

/relate_group is a new command for middleware. The application scenario is that tg group is used when binding multiple WeChat sessions. (Usually when multiple public accounts are bound to a tg group.) A message needs to be answered when used

[1]: Forward picture-type messages received by WeChat end usually with author name, remove picture title when forwarding such messages

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

efb-patch-middleware-0.0.1.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

efb_patch_middleware-0.0.1-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file efb-patch-middleware-0.0.1.tar.gz.

File metadata

  • Download URL: efb-patch-middleware-0.0.1.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.9

File hashes

Hashes for efb-patch-middleware-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e880353a8cc08b279673b9a9aa2dcd8eae3d7fe3edc1c339986df50a7ec03b23
MD5 5bbcb4ef37d929788ec1b44d8f18d25d
BLAKE2b-256 c21153bcf12b3adaf0a0e4d354f542e7716dd611e8ee832888baca546c674ad8

See more details on using hashes here.

File details

Details for the file efb_patch_middleware-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: efb_patch_middleware-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.6.9

File hashes

Hashes for efb_patch_middleware-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 786418550e48eaedfaa6c2740ea524d00982a04cd2e69fbeba791dc6baa90486
MD5 1d996fd8c426aeaec1fda95e33639f55
BLAKE2b-256 16fee9280beafa0acf01507d684483a556d04554cd959f80d069c54a2a0621f0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page