Code Monkey home page Code Monkey logo

telegram's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

telegram's Issues

Bugs when connecting to new account

Hi,
thanks for this awesome bridge.
So far it works really well for me, I just had some problems when initially logging in:

  1. The enter_code command was not found (neither directly nor by login), renaming it to entercode worked.
  2. The second problem was, that args[0] in mautrix_telegram/commands.py#L133 contained only a space so something is wrong there.

Add option to ignore specific Telegram chats in automatic portal creation

  • Change !delete-portal so that the portal wont be recreated before a restart
  • Add a command to un-flag portals from being exempt from room creation
  • Add option to !delete-portal and !unbridge to make the no-recreate flag persistent
  • (Maybe) Add option to un-flag command or a separate command to normally create a portal room (without receiving message)

Remove message duplication

Messages are duplicated a lot: If a portal room has multiple real Matrix users, messages from real Telegram users are duplicated for each real Matrix user. Messages from real Matrix users are also duplicated for each real Matrix user except for the sender.

Telegram doesn't have globally unique message IDs (only per-user unique IDs), so we have to figure out some other way to handle duplicate messages.

If #4 is implemented, we can use the bot as the primary source of information for all chats the bot has been added to. However, we'd still need to figure out how to avoid duplicates in chats without the bot.

Improve format conversion

  • Matrix -> Telegram
    • Decode HTML symbols like quotes
    • Replace <blockquote> with > for each line
    • Remove? <del> (strikethrough) and <u> (underline)
  • Telegram -> Matrix
    • Encode HTML symbols (this will probably also escape HTML tags in text)

The HTML symbol (en|de)coding is difficult, since Telegram formatting uses character indices...

Add command to check telegram connection status

Will be good to have command for check current connection status to telegram (logged out, logged in and active, logged in and inactive / connection problem), something like ping, that send some basic api command, wait reply and report status.

Prefixless management commands

If management commands are sent in a room without any other people, we should allow running management commands without the prefix.

Don't open private chats automatically based on getDialogs

Private chat dialogs are a bit weird in Telegram and seem to appear and disappear randomly from messages.getDialogs. Instead of automatic opening like groups and channels, we should allow the user to initiate private chats by either

  1. Inviting the Telegram user to a room with no other users.
  2. Using a management command such as !tg pm <user identifier>. In this case, we'll need to figure out what kind of identifier to use to make it easy to initiate chats while minimizing ambiguity.'

We should also automatically open the chat if there's no existing private chat open and the other person sends a message.

Message ID mapping DB table gets conflicts on channels

So I just found out that Telegram message IDs are even more messed up than I thought: Messages in private chats and normal groups have per-user unique IDs (different users see different IDs for the same message), but messages in channels/supergroups have per-channel unique IDs.

The per-channel unique IDs can conflict with the per-user unique IDs, which means that the current message ID mapping table is broken. Since primary keys can't be null, the composite primary key in the message table will probably have to be replaced with a composite unique key user-channel-message id where either user or channel is null.

This also means that deduplication of channel messages is a lot easier than other types of chats.

Allow creating Telegram groups

We should allow creating Telegram groups using the management commands and/or by simply inviting users to a new room.

Precise/non-hardcoded power level bridging

Power levels are currently bridged with preset values: In chats, 50 = admin and 95 = creator and in channels/supergroups 50 = moderator (admin who can't add other admins), 75 = admin and 95 = creator.

These values could be read from the power level requirements rather than using the hardcoded values. Also, the separate admin rights could be precisely bridged using the power level requirements.

Improve Telegram user displayname handling

The displaynames we get from the Telegram client API may be affected by the user who we're puppeting. AFAIK if the puppeted user has set a custom displayname for the target user, there's no way to get the real displayname that the target user has set themselves.

Sync user avatars automatically

Avatar syncing is mostly disabled due to potential API call flooding. We should try to figure out a way to sync avatars when needed without causing flooding.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.