Giter Club home page Giter Club logo

paper-plane's Introduction

Paper Plane
Paper Plane

Chat over Telegram on a modern and elegant client

Translation status CI status Packaging status Telegram group


Screenshot

Paper Plane is an alternative Telegram client. It uses libadwaita for its user interface and strives to meet the design principles of the GNOME desktop.

Paper Plane is still under development and not yet feature-complete. However, the following things are already working:

  • The use of multiple accounts at the same time.
  • Viewing text messages, images, stickers and files.
  • Sending text messages and images.
  • Replying to messages.
  • Searching for groups and persons.

Installation Instructions

Packaging status

Paper Plane is an in-development project and it isn't considered stable software yet.

Also, the included API credentials in the Flathub release are still very new and untested. In some cases, your account may end up banned by Telegram (check the Telegram API Credentials section below).

You can avoid that by using a custom built version of Paper Plane with provided API credentials via meson options, like this AUR package which you may prefer using if you use Arch Linux. These API credentials are much older and thus the risk of getting banned is reduced.

Flathub Beta

But, if you still feel brave enough, you can install the latest release from Flathub Beta. To do this, you need to add the the Flathub Beta remote first

$ flatpak remote-add --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo

Then you can install the application by issuing

$ flatpak install flathub-beta app.drey.PaperPlane

Paper Plane can be kept up to date by issuing flatpak's update command like

$ flatpak update

CI Build (Not Recommended)

You can also grab the latest CI build with test API credentials from here. Then you need to unzip the archive's content and install the application with the command flatpak install paper-plane.flatpak. Keep in mind that these test credentials are even more riskier than those from the Flathub release. Also, you need to manually keep it updated.

Telegram API Credentials

Telegram requires custom clients to set some credentials for using their API. Paper Plane doesn't provide official API credentials, so the packagers are expected to set their own credentials for distributing the app, obtainable at https://my.telegram.org/. However, Paper Plane includes the Telegram's test credentials by default, which are very limited, but usable (especially for development). However, it's known that Telegram sometimes decides to ban accounts that use such credentials (especially newer accounts). For that reason, it's suggested to use your own API credentials, which can be set by using meson options (see the Build Instructions section below).

Build Instructions

Gnome Builder

Using Gnome Builder is the easiest way to get the app built without even using the terminal: just clone the repository and press the big "Run" button at the top and it will automatically build all the required dependencies together with the app.

Meson

Prerequisites

The following packages are required to build Paper Plane:

  • meson
  • cargo
  • GTK >= 4.10 (with the patch included in the build-aux directory)
  • libadwaita >= 1.4
  • libshumate >= 1.0.0
  • TDLib 1.8.19
  • Telegram API Credentials (optional, but recommended)

Additionally, Paper Plane requires the following GStreamer plugins installed in your system to correctly show all media files:

  • gstreamer-libav
  • gstreamer-plugins-good

Instructions

meson . _build -Dtg_api_id=ID -Dtg_api_hash=HASH
ninja -C _build
sudo ninja -C _build install

Contribution

Any type of participation is encouraged. If you want to translate, you can refer to our weblate project. But also design and art contributions are welcome. For this our design repository is the first place to go.

If you want to contribute code, please keep your commits in the style of conventional commits. The only difference we make is that we capitalize the actual description after the colon ":" at the beginning of the sentence.

Acknowledgment

The general code architecture was heavily inspired by Fractal.

Also, some logic is inspired by Telegram X, which helps to understand how to use some TDLib features correctly and to their fullest potential.

paper-plane's People

Contributors

abidin251 avatar airon90 avatar alissonlauffer avatar bittin avatar comradekingu avatar danialbehzadi avatar darltrash avatar devlocalhost avatar fenimoure avatar flipflop97 avatar githubenjoyer avatar hosseinifard avatar ingrownmink4 avatar jannuary avatar just-carlod avatar k0-rr avatar krlade avatar liimee avatar marhkb avatar melix99 avatar newbytee avatar rene-coty avatar rezaalmanda avatar rodrigost23 avatar santossi avatar suhail-c avatar swyknox avatar wsxy162 avatar yoseforb avatar yuraiz avatar

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

paper-plane's Issues

Deleted chat are not hidden in the sidebar

When deleting a chat from another client, that chat in Telegrand is still shown for some reason (until you restart the app).

For what I understand, when a chat has to be hidden (like in this case) it should receive a ChatPosition update with the order value of 0. I already added a filter to hide the chats that has the order value equals to 0, so we should better investigate what's wrong here.

hide telegrand.session

it would be useful to create a .config / telegrand / folder for possible future configurations

empty chat window

I tried to compile with the latest commits but it doesn't make me send messages or open a chat

Schermata da 2021-03-21 18-07-04

Rewrite: thread 'main' panicked at 'not yet implemented' after successful login

thread 'main' panicked at 'not yet implemented', src/login.rs:145:17 stack backtrace: 0: 0x5572391c52e0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h03714f3c8b724ea9 1: 0x5572391e1c7c - core::fmt::write::ha56de15487b0693b 2: 0x5572391c2bf5 - std::io::Write::write_fmt::hd1e80be2b6be9618 3: 0x5572391c73b5 - std::panicking::default_hook::{{closure}}::h3a00c6f5375bc60f 4: 0x5572391c6e63 - std::panicking::default_hook::h8e6c796437ab9fa5 5: 0x5572391c7b61 - std::panicking::rust_panic_with_hook::h7d9487fb8f8a2b95 6: 0x5572391c7667 - std::panicking::begin_panic_handler::{{closure}}::h5b8a0d189d5c0ac9 7: 0x5572391c577c - std::sys_common::backtrace::__rust_end_short_backtrace::h77025130be0e1537 8: 0x5572391c75f9 - rust_begin_unwind 9: 0x5572391e0421 - core::panicking::panic_fmt::hda7bcdfe8e0f338e 10: 0x5572391e036d - core::panicking::panic::h9e7fff346a5eba9b 11: 0x557238eac29b - telegrand::window::Window::handle_update::hc35aed7dfdc6921d 12: 0x557238ed4ff5 - glib::main_context_channel::dispatch::h3fb359db4bba8acd 13: 0x7f1709a9d4cf - g_main_context_dispatch 14: 0x7f1709af14e8 - <unknown> 15: 0x7f1709a9ac03 - g_main_context_iteration 16: 0x7f1709cb995d - g_application_run 17: 0x557238edd001 - telegrand::application::Application::run::hce03ec8125898e48 18: 0x557238eaf819 - telegrand::main::ha83edf2c50dafe1e 19: 0x557238ec08b3 - std::sys_common::backtrace::__rust_begin_short_backtrace::hc5ec1f3ce908db32 20: 0x557238ec08c9 - std::rt::lang_start::{{closure}}::h035a9fc6bd1b26be 21: 0x5572391c7f7a - std::rt::lang_start_internal::h74daa238e6ffbc67 22: 0x557238eafa42 - main 23: 0x7f17095b9b75 - __libc_start_main 24: 0x557238e9108e - _start 25: 0x0 - <unknown>

  1. gtk4.x86_64 4.2.1-1.fc34
  2. libadwaita.x86_64 1.1.0-7.fc34
  3. tdlib.x86_64 1.7.0-2.fc34

Flathub package?

It would be nice to have this on Flathub. Are there any plans to make a Flatpak that then could be submitted to Flathub?

telegrand does not start in fullscreen

i don't know if that's really a bug or a matter of preferences, but here it is, and anyway i dunno why but i would expect telegrand to open in fullscreen...

Show loading screen while logging out

Logging out may take some time. In such a case, currently Telegrand stays looking like you're still logged in with no indication that you are currently being logged out. It would be good to give the user feedback that they are being logged out and prevent them from repeatedly pressing the log out button in confusion (like me) which causes threads to panic and is confusing.

muted chats are not muted

well, i guess the title says it all, this two chats for example, are muted, but i still receive notifications and they are shown as normal

Schermata da 2021-04-20 13-32-16

(oh and yes, after a new message was received, the preview on the chats list appeared)

Rewrite: Define the basic app structure

Note: This is one of the discussions for #19, so I suggest reading that issue first to better understand what's going on.

We need a basic app structure (or hierarchy) to better visualize and organize the project. I recently saw this blog post of a Fractal core contributor that talks about the structure of Fractal's rewrite in gtk4-rs and, since that project is pretty similar to Telegrand, I think that we can use a similar structure and design.

So, a basic hierarchy for Telegrand would look like this:

  • Window: it should handle the tdlib receiver until we close it.
    • GtkStack
      • Login: default page, it handles the login phase. Maybe it should also ask for the encryption key if the user wants to use it (it should be optional).
      • Session: it represents the main interface of a single client (Telegram account). For multi-client support we would probably have a Session for each account.

Then for the Session:

  • Session
    • Sidebar: it contains all the user chats. It should also handle the chat folders, but I'm not sure how we can show them (I don't like how t-desktop handles them with that big column to the left).
    • Content: a GtkStack to show the chat contents.

Then we would also define the relative GObjects, but that's pretty easy as they should be wrappers around TDLib's objects. The only problem is assuring that the objects are updated when we receive the relative update events. We receive updates from the receive() function that we will have in the Window object so, when we receive an update, the idea is to dispatch the updated object to the relative GObject though (probably) functions and maybe using hashmaps to find the correct GObject by an identifier. Obviously this doesn't sound too great so I'm really looking for a better solution, if you have one please don't be afraid to comment!

Support more message types

Currently we only support the "text" message type both for the preview in the sidebar and for the actual message in the chat history. We should definitely support more types, here's a list of types that I think we should support in the more short term (some are quite easy to implement):

  • Document (#87, #372)
  • Photo (#87, #165)
  • Sticker (#81)
  • Animation (#192)
  • ChatChangeTitle
  • ChatChangePhoto
  • ChatDeletePhoto
  • ChatAddMembers
  • ChatJoinByLink
  • ChatDeleteMember
  • PinMessage

Rewrite Telegrand: TDLib + GObjects + Flatpak + i18n

Note: this issue serves solely for general discussions about the rewrite branch and it will be closed after the merge in the main branch. I'll open new issues for discussing more specific implementations soon.

Telegrand was born as a testing/experimental project to learn Rust and Gtk4, so it has a really bad design and generally some implementation choices don't help to contribute to the project (even for me). This was ok for the initial test purpose that the project had, but the increasing (and unexpected!) interest in the project pushed me to a complete rewrite of the project, guided by all the things that I learned (both from my project and also looking at other similar projects).

The main aspect of the rewrite is the use of TDLib instead of grammers for the Telegram API backend. This change will add a fairly big dependency (88 MiB on Arch) but it will allow to create a very complete Telegram client compared to grammers (which is btw also a really nice project, it's just not suitable for the aim of Telegrand). For the TDLib interface for Rust, I developed a library that it contains a basic client interface and an automatic generator that generates all the types/functions supported from TDLib.

The other big change is the use of GObjects wrappers for exposing the internal data provided by TDLib objects as GObjects properties and to bind them to the appropriate GtkWidgets. This allows us to do less widgets logic as the widgets will be automatically updated when the internal data changes.

The remaining changes are the out-of-box support for Flatpak packaging and the internationalization support. Multi-account support is also on my wish list, but I'm still not sure if I want to add support for it before the merge.

Handle formatted text correctly

Currently we show the text "as is", but the text in the messages can be formatted (like link, bold, italic, etc.), so we should handle the format correctly. This means that we have to convert the text to a format type that gtk can actually use: pango markup.

We should also don't forget to correctly escape the html tags that don't need formatting, because telegram don't automatically assume this kind of tags as formatting, so we should just show them normally.

Compiling error [undefined reference for libadwaita]

Compiling telegrand v0.1.0 (/builddir/build/BUILD/telegrand)
error: linking with cc failed: exit status: 1
|
= note: "cc" "-m64" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.0.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.1.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.10.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.11.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.12.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.13.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.14.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.15.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.2.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.3.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.4.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.5.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.6.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.7.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.8.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.telegrand.tal4ysdl-cgu.9.rcgu.o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c.1j0xanji2tn2cwfp.rcgu.o" "-Wl,--as-needed" "-L" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps" "-L" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libpretty_env_logger-a6543bc98040ecf5.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libenv_logger-4b12e7e90205bd1b.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libtermcolor-278c57c99fe0ba74.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libatty-9aa11c4b54f4d254.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libhumantime-eef18f6d4bf19e69.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libquick_error-c897b47a14e1646f.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgettextrs-fcfc4d0ed6fc4df8.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgettext_sys-1f8037abb041a57a.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/liblocale_config-e84c013c9a58f87e.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libregex-9498bd1440e5e54d.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libaho_corasick-29177a72d4768f11.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libmemchr-3aa1bfabcc333dda.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libregex_syntax-ba6e9e330e2dd3f8.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/liblazy_static-1de99e4b5a9f73cc.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libindexmap-3e9f768736536b22.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libhashbrown-55649b26ba56d72f.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libtdgrand-c0660502e7687b81.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libserde_with-13674eef896e9b52.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libuuid-bf7ec2b8c9f562fa.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgetrandom-ab915863f91254f0.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libtokio-8446bceac41a32ef.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libnum_cpus-b1b8bf1a1aa81cb9.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libserde_json-6898c368036bc39c.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libryu-30cbb1ef01e47f3a.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libitoa-73ea5f99b6d49186.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libserde-e928e81ea35e2164.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/liblibadwaita-104a9317c28f15c8.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/liblibadwaita_sys-4dd8861a780042c7.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/liblog-89dd244ee0f8d740.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libcfg_if-661d0e8097094fd3.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgtk4-83e2c35c2f4b381d.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgsk4-d1459b5ebea123fb.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgraphene-5f4d53fb04ee1248.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgdk4-774f59c937658b85.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libpango-1982f0b986ff8e82.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgdk_pixbuf-29bc531c63bf57d8.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgio-868b261786b563ff.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libfutures_io-03b6a626c0f168b7.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libcairo-27d6f84e0dddcbe8.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libthiserror-07c63a4e4eac82c2.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libglib-a9624b9ee46adaab.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libfutures_executor-ebeb94f1447a30c8.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libfutures_util-f306495d9746350a.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libslab-04aa44819cacf9f5.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libpin_project_lite-07fb6c37612fd248.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libpin_utils-48b8b4cd17d7f343.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libfutures_channel-a14bcf26b9659e89.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libfutures_task-04ee55d90db4e991.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libfutures_core-2c37c9eb23b06168.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libsmallvec-17ea7a50d3c3117e.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libonce_cell-8427a4d9f75088f3.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libbitflags-b52051296940621b.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgtk4_sys-ec3a122c54b74cb9.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgsk4_sys-a4bad2abd2617dc7.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgraphene_sys-ddb77c579f438883.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgdk4_sys-4339919d3c87f22c.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libpango_sys-1ea8510af9c7b0be.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgdk_pixbuf_sys-9c746e299c00cd6b.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgio_sys-abe834762d043e12.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libgobject_sys-9738c983fc997da3.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libcairo_sys-79445a4ad0f7969e.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libglib_sys-ba18914f1ff29880.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/liblibc-d426d3935246f812.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libfield_offset-93c592221bd8d5cf.rlib" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/libmemoffset-744a2ecc2ffe4334.rlib" "-Wl,--start-group" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-bf03cc9564a26f41.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-fbc702d380a8152c.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-c827d8980f2034a4.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-630852f219f36ffb.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-6f1b88fbe0876520.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-18c5abe62c4ed226.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-7e634f4f6ca2c34e.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-1410cbe29d8a4d01.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-26e5dd87ae7df358.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-8fa642640bdddba7.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-141750bc8f9965db.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-5b4e69a1fda9ba29.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-22d634e91b1fc9d9.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-4e109f8b71dadde6.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-a15dd1c2a782b0d3.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-076c9fd85c323c11.rlib" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-e0346755056ef1ab.rlib" "-Wl,--end-group" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-bef5d70293e51f2b.rlib" "-Wl,-Bdynamic" "-ltdjson" "-ladwaita-1" "-lgtk-4" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lcairo-gobject" "-lcairo" "-lgraphene-1.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgobject-2.0" "-lgtk-4" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lcairo-gobject" "-lcairo" "-lgraphene-1.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgtk-4" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lcairo-gobject" "-lcairo" "-lgraphene-1.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgraphene-1.0" "-lgobject-2.0" "-lglib-2.0" "-lgtk-4" "-lpangocairo-1.0" "-lpango-1.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lcairo-gobject" "-lcairo" "-lgraphene-1.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lpango-1.0" "-lgobject-2.0" "-lglib-2.0" "-lharfbuzz" "-lgdk_pixbuf-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgio-2.0" "-lgobject-2.0" "-lglib-2.0" "-lgobject-2.0" "-lglib-2.0" "-lcairo-gobject" "-lgobject-2.0" "-lglib-2.0" "-lcairo" "-lgobject-2.0" "-lglib-2.0" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/usr/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/telegrand-ecb7ce2d4e06590c" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs"
= note: /usr/bin/ld: /builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/release/deps/liblibadwaita-104a9317c28f15c8.rlib(libadwaita-104a9317c28f15c8.libadwaita.4llwugfd-cgu.12.rcgu.o): in function <libadwaita::auto::application::Application as glib::types::StaticType>::static_type': libadwaita.4llwugfd-cgu.12:(.text._ZN86_$LT$libadwaita..auto..application..Application$u20$as$u20$glib..types..StaticType$GT$11static_type17hb23a5cc3ac16bde4E+0x2): undefined reference to adw_application_get_type'
collect2: error: ld returned 1 exit status

error: aborting due to previous error

error: could not compile telegrand

To learn more, run the command again with --verbose.
[3/4] /usr/bin/meson --internal msgfmthelper data/com.github.melix99.telegrand.metainfo.xml.in data/com.github.melix99.telegrand.metainfo.xml xml /builddir/build/BUILD/telegrand/po
FAILED: src/telegrand
/bin/sh /builddir/build/BUILD/telegrand/build-aux/cargo.sh /builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu /builddir/build/BUILD/telegrand src/telegrand '' telegrand
ninja: build stopped: subcommand failed.

undefined reference to `adw_application_get_type'

[Feature request] Keyboard shortcut for accessing test servers

A great feature (even for testing stuff while developing the client) would be a keyboard shortcut (or some hidden option) to switch to Telegram test servers since I already got one of my secondary accounts banned while trying this client. Grammers recently introduced a way to change the server which the client connects to in Lonami/grammers@339ecd1.

By the way, I've created a package in Arch Linux AUR: https://aur.archlinux.org/packages/telegrand-git

And thank you for your amazing work! I will probably try to contribute to the project in the future.

telegrand is only showing latest messages

Well, telegrand is not showing the entire conversation but only the last bits of it (like all the messages you can see on screen), and after that you can't scroll anymore sadly...

pictures are not loading

well i guess the title says all, pictures are not loaded, like in this case

Schermata da 2021-04-20 13-15-48

maybe this could help you?
thread '<unnamed>' panicked at 'called Result::unwrap()on anErr value: Custom { kind: Other, error: Rpc(RpcError { code: 303, name: "FILE_MIGRATE", value: Some(2) }) }', /builddir/build/BUILD/telegrand/x86_64-redhat-linux-gnu/target/cargo-home/git/checkouts/grammers-689e30b82f69dcd5/97cd0b9/lib/grammers-client/src/types/photo_sizes.rs:114:22

Considered using tdlib?

I realise this isn't much of an issue and more so something to discuss, but I can't find any obvious place to hold discussions about this (GitHub discussions isn't enabled for this repository and I see no e.g. Telegram discussion group), so I'm putting it here.

Have you considered using tdlib (via e.g. telegram-client) instead of interfacing directly with the Telegram API? This gives you things like secret chats "for free", albeit with the cost of that you have less control since tdlib does a lot for you. Still, I think having secret chats on desktop would make this very lucrative and having to do less work could make development easier.

Hide send message area when not needed

We show this widgets to send messages even in chats where we can't actually send messages (like in channels or deleted accounts), so we should hide them in this cases.

Show message status indicators

Next to the time of the message sent (#28), there should be an icon indicating its status:

  • a clock for when it's sending Adwaita Clock Icon
  • a check mark for when it's sent Adwaita OK Icon
  • a double check mark for when it's read
  • a red exclamation mark within a circle for when there was an error sending the message Adwaita Important Icon
  • ... maybe some other I missed?

This applies both to the preview in the sidebar and the chat bubbles in the history.

Edit: Added some examples from adwaita-icon-theme

Support multiline text in the entry for sending messages

Currently the entry in the send message area don't support multiline text, so we should use another widget. There are mainly two alternatives: a GtkTextView or GtkSourceView. Fractal uses GtkSourceView, but I don't quite understand why they're using that instead of a simpler GtkTextView, so we should investigate on what GtkSourceView could offer more than GtkTextView and decide on what to use for our case.

some chat lists are not showning preview

as you can see from the picture, some previews are empty

i know that this is early stage of development but i thought about reporting bugs and missing features, if that's ok for you
Schermata da 2021-04-20 13-20-45

Show the sender in the last message preview of the chats in the sidebar

Some details on the needed implementation:

  • The sender in the preview should always be updated if his name is changed (so we should use some sort of gtk expressions, similar to how we show the sender in the messages)
  • We should only show the sender when the chat is a group
  • Show a translatable "You:" string when the message is ours
  • The sender text should have more contrast than the content

Provide a .flatpak file for testing

I know the app is probably not evn in an alpha state but how about providing a .flatpak file for testing without having to build the whole thing?

nothing shown in app

hello, sometimes it happens i open the app but it's completely empty

terminal says this, maybe it can help you

thread '<unnamed>' panicked at 'Telegram thread error: Invoke(Read(Io(Custom { kind: ConnectionReset, error: "read 0 bytes" })))', src/telegram.rs:59:16 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Need an icon

Well, I'm definitely not good at art, so hopefully it won't be me designing it. But having an icon would be good especially for joining in the GNOME Circle.

Change user status to offline when mouse and keyboard inactivity is detected

In Telegram Desktop, when the user's mouse and keyboard are inactive for more than 30 seconds, the client is set to "offline".

As the project is also intended for mobile devices:
In Telegram Android, this behavior does not happen and the client remains "online" until the screen is locked. I think this behavior is different from Telegram Desktop because most Android devices use low screen timeouts (30s or 1 min) compared to desktop PCs. So maybe we could detect whether the device is a mobile device and change this behavior accordingly?

Open relative chat when clicking a notification

To do this we need the sidebar to be able to change its selection based on the selected-chat parameter change. Maybe we should create a custom selection to do this, but it's not easy to implement.

Great project

excellent project, just missing a client in gtk4.
If you are interested I am packaging the project on copr in order to make it accessible to fedora users.

https://copr.fedorainfracloud.org/coprs/tuxino/Blob/builds/

only problem: is there a public api_id and api_ash? solved this problem I will start the compilation

Good job dude (o buon lavoro se sei italiano)

Rewrite: Define the login flow

Note: This is one of the discussions for #19, so I suggest reading that issue first to better understand what's going on.

We need to implement a new login flow as we now have a different Telegram API backend and we also have more options.
The TDLib login flow for a single client (account) usually works like this (in this exact order):

  1. Send TDLib parameters
  2. Send encryption key
  3. Send phone number
  4. Send authentication code
  5. (If required) Send password for 2fa

The next time you log in it just needs the first 2 steps.

The proposed login flow for Telegram will be made of "navigational pages" or, to be more precise, of an AdwLeaflet (basically similarly to how the current AddAccountWindow is made). The other change is that the login page will just be a widget instead of a window like it was before.

The login flow would look like this (imagine the numbers being the pages):

  1. Welcome the user and ask for the phone number. Below the phone number it will be a sort of expandable "Advanced" section where you can define an encryption key (it will be empty by default) and some TDLib parameters (like connecting to a test datacenter, etc). With this step, we're doing the first TDLib's 3 steps.
  2. Ask for the authentication code sent on the other Telegram devices. We would also offer an option to send the code via SMS.
  3. (If required) Ask for the 2fa password.

Then, for the next times that the user logs in:

  1. The app automatically sends the TDLib parameters related to that account (probably they will be saved locally via gsettings).
  2. The app will try to send an empty encryption key. If it fails it will prompt the user to enter the correct encryption key.

I'm not too sure about the second step, maybe we should just store a variable about if the user actually sets an encryption key or not, but at the same time I don't think it's a good idea to store this kind of data.

Related to #14.

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.