GithubHelp home page GithubHelp logo

gurk-rs's Introduction

gurk 🥒

ci chat

Signal Messenger client for terminal.

screenshot

Installation

Pre-compiled binary

Download a pre-compiled binary from Releases for following targets:

  • x86-64 Linux GNU
  • x86-64 Linux musl
  • aarch64 Linux GNU
  • aarch64 Linux musl (>= v0.2.4 only)
  • x86-64 Darwin
  • aarch64 Darwin

From source (using cargo)

Prerequisites:

cargo install --git https://github.com/boxdot/gurk-rs gurk

Arch Linux

Packaged in the AUR: gurk-git and gurk-bin

Nix/NixOS

Either per user:

$ nix-env --install gurk-rs

or system-wide:

environment.systemPackages = with pkgs; [ gurk-rs ];

Usage

Run

gurk

On the first run, it will open a QR code in your favorite image viewer, such that you can link the client as a new device. This will also create a configuration file at the default config location. For the configuration directives, see src/config.rs.

Note: The binary cannot be published on crates.io, because it depends on several official Signal libraries that are not available on crates.io.

Chat

chat-qr

Key bindings

  • App navigation
    • f1 Toggle help panel.
  • Message input
    • tab Send emoji from input line as reaction on selected message.
    • alt+enter Switch between multi-line and singl-line input modes.
    • alt+left, alt+right Jump to previous/next word.
    • ctrl+w / ctrl+backspace / alt+backspace Delete last word.
    • ctrl+u Delete to the start of the line.
    • enter when input box empty in single-line mode Open URL from selected message.
    • enter otherwise Send message.
  • Multi-line message input
    • enter New line
    • ctrl+j / Up Previous line
    • ctrl+k / Down Next line
  • Cursor
    • alt+f / alt+Right / ctrl+Right Move forward one word.
    • alt+b / alt+Left / ctrl+Left Move backward one word.
    • ctrl+a / Home Move cursor to the beginning of the line.
    • ctrl+e / End Move cursor the the end of the line.
  • Message/channel selection
    • Esc Reset message selection.
    • alt+Up / alt+k / PgUp Select previous message.
    • alt+Down / alt+j / PgDown Select next message.
    • ctrl+j / Up Select previous channel.
    • ctrl+k / Down Select next channel.
    • ctrl+p Open / close channel selection popup.
  • Clipboard
    • alt+y Copy selected message to clipboard.

License

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this document by you, as defined in the AGPL-3.0-only license, shall be licensed as above, without any additional terms or conditions.

gurk-rs's People

Contributors

boxdot avatar brambonne avatar cleeyv avatar cyrinux avatar devhell avatar ephemer4l avatar gferon avatar goolord avatar knoxell avatar langfingaz avatar maximbaz avatar mucinoab avatar ragnargrootkoerkamp avatar sup3legacy avatar whynothugo 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

gurk-rs's Issues

Duplicate messages

When sending a message in group channels, sometimes it appears multiple times in the chat on other devices.

how do I switch channel keybinding? (noob)

Hi and thank you so much for putting this program together! I am very excited to try this.
I have also never used rust before.

I want to try gurk-rs but after linking the ui is empty. is this how it is suppose to be?
I am also unsure of what type of keybindings are used in gurk - I am sort of stuck in the Input area and I don't know what to do:P Would any of you guys maintaining this project please have time to just point me in the right direction to get
started with this?

EDIT: okay so i figured out how to send message but the issue I am having is that i don't know
how to switch channels and rename them. I have never used rust but I thought this project was a cool way of getting into rust programming. i am going to try to look into the source later. It is amazing to write in the terminal and see it popup in my phone instantly.

Emoticons visual glitch

Hi!

I have experienced some visual glitches :

Doubled emoticon

Whenever a message contains a doubled emoticon, the last one stays on screens when switching conversation, only to disappear when overwritten by a character.

I am using the last release 2.0.0 on pop_OS! 20.04

Here is a screenshot : both hearts are ghost leftover by a message from a conversation I switched from. In both cases, their were two heart emojis and the last one stayed on screen.

image

In this image, we can also see an instance of the other glitch I describe. (Note also there seems to be some holes in the right border, maybe with a reason)

Reaction right bracket

It has also occurred to me that the right bracket from a reaction remains on screen.

The right bracket in the reaction to that message

image

Stays on screen when switching to this (different) conversation

image

Compilation Error E0053 - 'could not compile 'presage' - WSL

Trying to install gurk in a fresh install of Rust (using rustup) in Windows Subsystem for Linux 2. Installing using cargo install --git https://github.com/boxdot/gurk-rs

I get the following error:

error[E0053]: method `get_sub_device_sessions` has an incompatible type for trait
   --> /home/chilko/.cargo/git/checkouts/presage-cb95f00af9f2a4a6/25cfb40/src/config/sled.rs:328:5
    |
328 |     async fn get_sub_device_sessions(&self, name: &str) -> Result<Vec<u32>, SignalProtocolError> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `futures::Future<Output = Result<Vec<u32>, libsignal_service::prelude::protocol::SignalProtocolError>> + std::marker::Send`, found trait `futures::Future<Output = Result<Vec<u32>, libsignal_service::prelude::protocol::SignalProtocolError>>`
    |
    = note: expected fn pointer `fn(&'life0 SledConfigStore, &'life1 str) -> Pin<Box<(dyn futures::Future<Output = Result<Vec<u32>, libsignal_service::prelude::protocol::SignalProtocolError>> + std::marker::Send + 'async_trait)>>`
               found fn pointer `fn(&'life0 SledConfigStore, &'life1 str) -> Pin<Box<(dyn futures::Future<Output = Result<Vec<u32>, libsignal_service::prelude::protocol::SignalProtocolError>> + 'async_trait)>>`

error[E0053]: method `delete_session` has an incompatible type for trait
   --> /home/chilko/.cargo/git/checkouts/presage-cb95f00af9f2a4a6/25cfb40/src/config/sled.rs:350:5
    |
350 |     async fn delete_session(&self, address: &ProtocolAddress) -> Result<(), SignalProtocolError> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `futures::Future<Output = Result<(), libsignal_service::prelude::protocol::SignalProtocolError>> + std::marker::Send`, found trait `futures::Future<Output = Result<(), libsignal_service::prelude::protocol::SignalProtocolError>>`
    |
    = note: expected fn pointer `fn(&'life0 SledConfigStore, &'life1 ProtocolAddress) -> Pin<Box<(dyn futures::Future<Output = Result<(), libsignal_service::prelude::protocol::SignalProtocolError>> + std::marker::Send + 'async_trait)>>`
               found fn pointer `fn(&'life0 SledConfigStore, &'life1 ProtocolAddress) -> Pin<Box<(dyn futures::Future<Output = Result<(), libsignal_service::prelude::protocol::SignalProtocolError>> + 'async_trait)>>`

error[E0053]: method `delete_all_sessions` has an incompatible type for trait
   --> /home/chilko/.cargo/git/checkouts/presage-cb95f00af9f2a4a6/25cfb40/src/config/sled.rs:366:5
    |
366 |     async fn delete_all_sessions(&self, _name: &str) -> Result<usize, SignalProtocolError> {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait `futures::Future<Output = Result<usize, libsignal_service::prelude::protocol::SignalProtocolError>> + std::marker::Send`, found trait `futures::Future<Output = Result<usize, libsignal_service::prelude::protocol::SignalProtocolError>>`
    |
    = note: expected fn pointer `fn(&'life0 SledConfigStore, &'life1 str) -> Pin<Box<(dyn futures::Future<Output = Result<usize, libsignal_service::prelude::protocol::SignalProtocolError>> + std::marker::Send + 'async_trait)>>`
               found fn pointer `fn(&'life0 SledConfigStore, &'life1 str) -> Pin<Box<(dyn futures::Future<Output = Result<usize, libsignal_service::prelude::protocol::SignalProtocolError>> + 'async_trait)>>`

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0053`.
error: could not compile `presage`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `gurk v0.2.0 (https://github.com/boxdot/gurk-rs#a3089d53)`, intermediate artifacts can be found at `/tmp/cargo-installxQiXMp`

Stutter when sending a message

The same happens sometimes when receiving messages during typing.

This is most likely due to running sending/receiving messages in the same thread as the UI. We should move it out to a different thread.

Note: There is also an effort to enable presage::Manager to send messages through a websocket (the same which used for receiving messages). This might simplify our code.

Crash from attempting to display messages in one channel

Attempting to display the messages from one of my groups caused gurk to abort with the following errors:

memory allocation of 18446744073709551609 bytes failed
Thread 1 "gurk" received signal SIGABRT, Aborted.
0x00007ffff7c80d22 in raise () from /usr/lib/libc.so.6

I got a backtrace from gdb and it looked like this:

(gdb) bt
#0  0x00007f1f06468d22 in raise () from /usr/lib/libc.so.6
#1  0x00007f1f06452862 in abort () from /usr/lib/libc.so.6
#2  0x0000562b51c0d98a in std::sys::unix::abort_internal () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399//library/std/src/sys/unix/mod.rs:237
#3  0x0000562b51c009e9 in std::process::abort () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399//library/std/src/process.rs:1792
#4  0x0000562b51c03d20 in std::alloc::rust_oom () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399//library/std/src/alloc.rs:332
#5  0x0000562b51608f7a in alloc::alloc::__alloc_error_handler::__rg_oom () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399//library/alloc/src/alloc.rs:397
#6  0x0000562b515f2187 in __rust_alloc_error_handler ()
#7  0x0000562b51608f69 in alloc::alloc::handle_alloc_error () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399//library/alloc/src/alloc.rs:366
#8  0x0000562b516096d0 in alloc::raw_vec::RawVec::allocate_in<u8,alloc::alloc::Global> () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399//library/alloc/src/raw_vec.rs:206
#9  alloc::raw_vec::RawVec::with_capacity_in<u8,alloc::alloc::Global> () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399//library/alloc/src/raw_vec.rs:142
#10 alloc::vec::Vec::with_capacity_in<u8,alloc::alloc::Global> () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399//library/alloc/src/vec/mod.rs:574
#11 alloc::vec::Vec::with_capacity<u8> () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399//library/alloc/src/vec/mod.rs:440
#12 alloc::slice::{{impl}}::repeat<u8> () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399//library/alloc/src/slice.rs:534
#13 alloc::str::{{impl}}::repeat () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399//library/alloc/src/str.rs:493
#14 0x0000562b517b211b in core::ops::function::impls::<impl core::ops::function::FnMut<A> for &mut F>::call_mut ()
#15 0x0000562b51791e55 in <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::next ()
#16 0x0000562b517ab348 in <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter ()
#17 0x0000562b517c59f6 in gurk::ui::draw ()
#18 0x0000562b5174c2e6 in tui::terminal::Terminal<B>::draw ()
#19 0x0000562b5184b133 in gurk::run_single_threaded::_$u7b$$u7b$closure$u7d$$u7d$::hd2afcf3e81f1528e ()
#20 0x0000562b516ee9f6 in tokio::macros::scoped_tls::ScopedKey<T>::set ()
#21 0x0000562b518201f7 in <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll ()
#22 0x0000562b51727adc in tokio::runtime::enter::Enter::block_on ()
#23 0x0000562b517a378e in tokio::runtime::thread_pool::ThreadPool::block_on ()
#24 0x0000562b51862d2a in tokio::runtime::Runtime::block_on ()
#25 0x0000562b517c77d6 in gurk::main ()
#26 0x0000562b517b0c36 in std::sys_common::backtrace::__rust_begin_short_backtrace ()
#27 0x0000562b517b0c4d in std::rt::lang_start::{{closure}} ()
#28 0x0000562b51c05160 in core::ops::function::impls::{{impl}}::call_once<(),Fn<()>> () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399/library/core/src/ops/function.rs:259
#29 std::panicking::try::do_call<&Fn<()>,i32> () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399//library/std/src/panicking.rs:379
#30 std::panicking::try<i32,&Fn<()>> () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399//library/std/src/panicking.rs:343
#31 std::panic::catch_unwind<&Fn<()>,i32> () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399//library/std/src/panic.rs:431
#32 std::rt::lang_start_internal () at /rustc/a143517d44cac50b20cbd3a0b579addab40dd399//library/std/src/rt.rs:51
#33 0x0000562b517c78b5 in main ()

Based on lines 15-18, I assumed that the issue somewhere in fn draw_messages in ui.rs.

When I built it locally, the --verbose log showed the following error:

[2021-07-18T14:52:11.760959272-04:00 ERROR log_panics] thread 'main' panicked at 'attempt to subtract with overflow': src/ui.rs:300

This was enough info for PR that seems to have fixed the problem.

No device found error

A user reports when starting on a fresh machine with version 0.2.2, after scanning the QR code 'No device found error' appears on the android app and gurk fails with 'no provisioning message received'.

Last commit fails on ARM

I cannot compile commit #f89dbf69 ...rust too old?

error: there is no argument named `n`
    --> src/app.rs:1620:42
     |
1620 |         n => Some(format!("<attachments ({n})>")),
     |                                          ^^^

error: failed to compile `gurk v0.2.3 (https://github.com/boxdot/gurk-rs#f89dbf69)`

gurk-rs has been packaged for NixOS

Hi!

I've packaged your wonderful project for NixOS. Thank you for this, it's much nicer to interact with Signal in a terminal than the native client. I'm looking forward to seeing improvements to gurk 😃

Thanks again, prost! 🍻

Compilation error E0599 on Raspberry Pi OS

Hi!
I would like to install gurk on my raspberry pi 400 ut process fails like this:

`
cargo install gurk

...

Compiling tui v0.10.0
error[E0599]: no associated item named MAX found for type usize in the current scope
--> /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/tui-0.10.0/src/buffer.rs:266:47
|
266 | self.set_stringn(x, y, string, usize::MAX, style);
| ^^^ associated item not found in usize
|
help: you are looking for the module in std, not the primitive type
|
266 | self.set_stringn(x, y, string, std::usize::MAX, style);
| ^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try rustc --explain E0599.
error: could not compile tui.
warning: build failed, waiting for other jobs to finish...

`

cannot link device

I'm scaning the barcode with both Samsung and Apple phone but getting either "network error", ""no device found", "device approuved"(but doesn't appear under linked devices).
Any advice?

Non-persistent notifications

Currently notifications are always persistent. It would be nice if they respected the default timeouts set by my notifications daemon (mako).

QR code not opening

Running under KDE neon, it just hangs on "Linking new device with device name: gurk@laptop" and tries to open my image viewer but fails.

Messages not received using version 0.6.12 of signal-cli

Tonight I stopped being able to receive messages with gurk. I could still send messages from gurk, and signal-cli was still receiving messages even though gurk was not. Fresh installs of gurk and of signal-cli did not resolve the issue.

I have determined that it is because I recently ran upgrades that included a new version of signal-cli, 0.6.12. As a workaround I have downgraded to version 0.6.11 and this has resolved the issue.

Here are the changes introduced by version 0.6.12 of signal-cli: AsamK/signal-cli@v0.6.11...v0.6.12

Some of the changed are related to json output of received messages, which seems like a plausible cause of the problem, probably in relation to the gurk stream_messages function.

Rate limiting on too many receipts

We get rate limited since we are sending to many receipts back.

Atm, this is done in the UI component. We should move it out of there.

"Disappearing Messages" feature

Currently if you have Disappearing Messages enabled in a chat, they are disabled as soon as a message is sent from gurk to that chat.

I guess this is because the client doesn't support the Disappearing Messages feature, rather than it specifically disabling the option

@-mentions UI issue

In my terminal, display of @-mentions seems to be broken (using kitty) :
image

The first character is supposed to be an @-mention (correctly displayed on my other clients) but that weird character gets printed instead.

Same thing using alacritty :
image

Not sure as to whether this is a terminal-related issue though.

Unable to detect Shift+Enter

I'm currently looking into implementing the multi-line feature using the Shift + Enter keybinding. However it seems the event handling implementation is not able to capture it. Pressing this binding only yields

KeyEvent { code: Enter, modifiers: NONE }

i.e. the SHIFT modifier is not detected.

Some contact(s) is named after my own account

My Signal name is "tho". My friend messaged me, and he appears to be named "tho" too. Now I have two chats named "tho" - him, and my own messages (that are supposed to be named like me). In the chat with him I can't tell my own messages from his

Segfault on HardenedBSD

I tried running Gurk on my HardenedBSD 13-CURRENT/amd64 system. Attached is a screenshot of the segfault.

silent failure to deliver message with "untrusted identity"

Appears in chat:
image

Shows in gurk.log:

[2022-01-18T09:42:01.870092819-05:00 INFO libsignal_service::sender] establishing new session with ProtocolAddress { name: "2f6dbbf5-1f15-43a4-XXX", device_id: 1 }
[2022-01-18T09:42:02.040619854-05:00 ERROR gurk::signal] Failed to send message to 2f6dbbf5-1f15-43a4-8ffe-XXX: libsignal-service sending error: protocol error: untrusted identity for address 2f6dbbf5-1f15-43a4-XXX.1

I see likely related message in official android client:
"Your safety number with X has changed."

I would expect a clear failure indication.

Bonus: A method to manage safety number changes.

Opening weblinks, sync messages on first load

There is no way to open weblinks in a message. I expected mouse right click to open link in web browser.
But mouse in entirely disabled in Messages area.

After installing on first run, i expected gurk to sync my old messages. Once device is linked, new messages do sync up.

First time filing an issue, apologies for any mistakes.

Overall I love the idea of a terminal client. Much faster than the GUI desktop app. Thanks for your efforts :)

Encrypt data store

Messages, contacts, and application state are stored unencrypted. We should encrypt the data on the client. We have to decide, though, which mechanism to use for encryption. I can think of:

  1. Use gpg key from configuration
  2. Use ssh key from default location or configuration
  3. Password on startup

There is some controversy about encryption of the data on the client (see e.g. https://community.signalusers.org/t/why-cant-we-lock-the-desktop-app-with-a-password/1383). However, for a TUI application there is strong use case. Such application can be easily used in multi-user environments, e.g. over ssh, and then messages and contacts are much easier exposed (e.g. to an admin of the machine).

Note about signal-cli:

Since we use signal-cli for communication with the Signal backends, and it stores its own data unecrypted, to provide the full encryption, we would need to replace this backend.

Issue in put_char for chars like "é"

Note: I use a modified version of gurk-rs, modified from an old version, so it can be fixed, but I don't think so

https://github.com/boxdot/gurk-rs/blob/master/src/app.rs#L186

Inserting multiple "é" (with other letters) will increase the size of the input in bytes quicker than the cursor, and will result in insertion in previous positions

So the reproduce steps:

  • Open a conversation
  • type 1é1é

Current result:

will be 1éé1 instead of 1é1é

Ps: thx for your work

compilation errors on 'cargo install gurk'

cargo install gurk

error[E0277]: the trait bound `std::vec::Vec<tui::layout::Constraint>: std::convert::From<[tui::layout::Constraint; 2]>` is not satisfied
  --> /home/oren/.cargo/registry/src/github.com-1ecc6299db9ec823/gurk-0.1.0/src/ui.rs:18:10
   |
18 |         .constraints([Constraint::Ratio(1, 4), Constraint::Ratio(3, 4)])
   |          ^^^^^^^^^^^ the trait `std::convert::From<[tui::layout::Constraint; 2]>` is not implemented for `std::vec::Vec<tui::layout::Constraint>`
   |
   = help: the following implementations were found:
             <std::vec::Vec<T> as std::convert::From<&[T]>>
             <std::vec::Vec<T> as std::convert::From<&mut [T]>>
             <std::vec::Vec<T> as std::convert::From<std::borrow::Cow<'a, [T]>>>
             <std::vec::Vec<T> as std::convert::From<std::boxed::Box<[T]>>>
           and 5 others
   = note: required because of the requirements on the impl of `std::convert::Into<std::vec::Vec<tui::layout::Constraint>>` for `[tui::layout::Constraint; 2]`

error[E0277]: the trait bound `std::vec::Vec<tui::layout::Constraint>: std::convert::From<[tui::layout::Constraint; 2]>` is not satisfied
  --> /home/oren/.cargo/registry/src/github.com-1ecc6299db9ec823/gurk-0.1.0/src/ui.rs:81:10
   |
81 |         .constraints([
   |          ^^^^^^^^^^^ the trait `std::convert::From<[tui::layout::Constraint; 2]>` is not implemented for `std::vec::Vec<tui::layout::Constraint>`
   |
   = help: the following implementations were found:
             <std::vec::Vec<T> as std::convert::From<&[T]>>
             <std::vec::Vec<T> as std::convert::From<&mut [T]>>
             <std::vec::Vec<T> as std::convert::From<std::borrow::Cow<'a, [T]>>>
             <std::vec::Vec<T> as std::convert::From<std::boxed::Box<[T]>>>
           and 5 others
   = note: required because of the requirements on the impl of `std::convert::Into<std::vec::Vec<tui::layout::Constraint>>` for `[tui::layout::Constraint; 2]`

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0277`.
error: failed to compile `gurk v0.1.0`, intermediate artifacts can be found at `/tmp/cargo-installPopXGn`

Caused by:
  could not compile `gurk`.

To learn more, run the command again with --verbose.

More info:

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.6 LTS
Release:	16.04
Codename:	xenial

$ uname -a
Linux or

Open links

It is hard to open links in gurk. Some terminals (iterm2, alacritty) support opening links under the cursor, however if the link is wrapped it does not work. A proposal is to select the mesage containing a link with alt+up/down and press enter.

The same technique can be applied to opening attachments.

As a follow-up we could add a mouse selection of messages and a context menu. This would require a mapping between absolute lines and messages in the messages list (involved due to text wrap).

how do i update gurk? cargo noob quiestion

Hi,

so i have been doing a couple of searches and i cannot understand how to update gurk to the latest version.
How do i update gurk if i installed it with this command?

cargo install --git https://github.com/boxdot/gurk-rs

Thanks,

Handling Images

I know that viewing images is on the to-do list, but it currently when you receive or send an image, there is no indicator that this is the case. It would be great to have either the link to the image or an indicator that it exists displayed instead of its content until proper image support is implemented.

Panic when attempting to display a certain channel

While testing the latest build I noticed that selecting one of my channels always caused a crash. Running gurk --verbose showed the following log entry for the crash:

[2021-06-08T12:34:01.035460119-04:00 ERROR log_panics] thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: 1': src/ui.rs:283

Which refers to the third line of this block of code in the display_message function of the ui module, which was introduced a few weeks ago in a3089d5:

    let idx = names_and_colors
        .binary_search_by_key(&msg.from_id, |&(id, _, _)| id)
        .unwrap();
    let (_, from, from_color) = names_and_colors[idx];

I examined the channel triggering the panic to try to determine why it is exceptional in this way but did not confirm the specific cause of the error. The best guess I have so far is that the error occurs when trying to display a message in the group that was sent by a former member of the group that has left, and who is also not already listed elsewhere on the channels list.

However, I didn't take further steps to reproduce the cause of the error because I was able to fix it by replacing the problematic .unwrap() line with .unwrap_or_default();. I will submit a PR for this fix.

Messages from "self" show as "Unknown Name" sender

Any message sent by me on any device shows up as "Unknown Name" sender. I have my "Name" set in the Signal App (on phone) and in gurk.toml:

[user]
name = "<Name>"
phone_number = "+1<10 digit number>"

I do note that the from_id of the message is not present in names JSON sub-document of gurk.data.json.

Should a "self" id populate automatically?

I am new to rust, so not quite sure how to trace this back yet.

names.get(&id).map(|s| s.as_ref()).unwrap_or("Unknown Name")

missing contact names

Gurk works pretty well for me, thanks for the amazing work! <3

One thing which bugs me is, that gurk does not show any contact names. Only groups have names. I see your screenshot in the readme and it seems to be intended to show the usernames. Am I doing something wrong? Can I fix it? Can I provide some information to allow you to debug this?

Let me know, keep coding!

Settings

As gurk now has some features that some users may wish to disable (especially regarding the message receipts), I think some sort of settings panel to toggle them would be a great addition. If approved, I can look into implementing this.

Config and data file creation errors after new install

I uninstalled my old gurk and removed all the old config files to test a fresh install. On the initial run of gurk, I got the following output and error (the qr code displayed correctly and I scanned it):

[USER@HOST ~]$ gurk
Linking new device with device name: gurk@HOST
Config { data_path: "/home/USER/.local/share/gurk/gurk.data.json", signal_db_path: "/home/USER/.local/share/gurk/signal-db", first_name_only: false, user: User { name: "NAME", phone_number: "+###########" } }
Error: failed to init config file

Caused by:
    No such file or directory (os error 2)

This is on Linux. I've been debugging and I think the issue is with this line https://github.com/boxdot/gurk-rs/blob/master/src/config.rs#L42 and that manually creating the directory ~/.config/gurk before the initial run of gurk is a workaround. I'm working on a PR that will hopefully fix the issue.

Scrolling loops backs to first message

When using mouse wheel to scroll the messsages, it does not stop at the last message, instead loops back to the first and continues endless scrolling.

This is problematic, if hundred messages have to be scrolled with a mouse wheel to get to the latest message.

Ideal behavior imho would be to stop scrolling at the last message

Packaging?

Is packaging planned?

Would love to see this for example in the Debian repos. :)

Missing some `Delivered` message status update

Some messages never appear to be delivered, even though they are in fact delivered (as confirmed on other clients), while all Read receipts seem to be received and handled just fine. I think we might be missing some delivery information, hidden somewhere in the packets sent by the server.

How to keep my phone registered

After registering new device

signal-cli -u +xxxxxxxxxxx register
signal-cli -u +xxxxxxxxxxx verify 127-798

I see on my signal app (on my phone): device no longer registered. How do I keep the app on my phone working and using this CLI?

HKDF compile errors

Using cargo install --git https://github.com/boxdot/gurk-rs gurk failure to compile with cause of "could not compile libsignal-service"

Searching didn't bring up much, but there was mention of removal of "versions" from upstream libsignal-client.

Using cargo clean && cargo build --workspace in the checkout dir completes without error, but cargo install --git https://github.com/boxdot/gurk-rs gurk errors.

Possibly a version incompatibility between libsignal-service-rs and libsignal-client?

I am not familiar enough with rust yet to understand why the behavior would be different between the checkout and build vs the direct install --git.

error[E0432]: unresolved import `libsignal_protocol::HKDF`
  --> /home/achasen/.cargo/git/checkouts/libsignal-service-rs-e91a0c40cab55da9/be8b839/libsignal-service/src/sealed_session_cipher.rs:13:53
   |
13 |     SessionStore, SignalMessage, SignedPreKeyStore, HKDF,
   |                                                     ^^^^ no `HKDF` in the root

error[E0433]: failed to resolve: could not find `HKDF` in `libsignal_protocol`
  --> /home/achasen/.cargo/git/checkouts/libsignal-service-rs-e91a0c40cab55da9/be8b839/libsignal-service/src/groups_v2/utils.rs:12:36
   |
12 |     let hkdf = libsignal_protocol::HKDF::new(3)?;
   |                                    ^^^^ could not find `HKDF` in `libsignal_protocol`

error[E0433]: failed to resolve: could not find `HKDF` in `libsignal_protocol`
  --> /home/achasen/.cargo/git/checkouts/libsignal-service-rs-e91a0c40cab55da9/be8b839/libsignal-service/src/provisioning/cipher.rs:94:40
   |
94 |         let hkdf = libsignal_protocol::HKDF::new(3)?;
   |                                        ^^^^ could not find `HKDF` in `libsignal_protocol`

error[E0433]: failed to resolve: could not find `HKDF` in `libsignal_protocol`
   --> /home/achasen/.cargo/git/checkouts/libsignal-service-rs-e91a0c40cab55da9/be8b839/libsignal-service/src/provisioning/cipher.rs:158:40
    |
158 |         let hkdf = libsignal_protocol::HKDF::new(3)?;
    |                                        ^^^^ could not find `HKDF` in `libsignal_protocol`

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
  --> /home/achasen/.cargo/git/checkouts/libsignal-service-rs-e91a0c40cab55da9/be8b839/libsignal-service/src/groups_v2/utils.rs:13:9
   |
13 |     let bytes =
   |         ^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[u8]`
   = note: all local variables must have a statically known size
   = help: unsized locals are gated as an unstable feature

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
  --> /home/achasen/.cargo/git/checkouts/libsignal-service-rs-e91a0c40cab55da9/be8b839/libsignal-service/src/groups_v2/utils.rs:14:9
   |
14 |         hkdf.derive_secrets(group_id, b"GV2 Migration", GROUP_MASTER_KEY_LEN)?;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[u8]`
   = note: all local variables must have a statically known size
   = help: unsized locals are gated as an unstable feature

error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
  --> /home/achasen/.cargo/git/checkouts/libsignal-service-rs-e91a0c40cab55da9/be8b839/libsignal-service/src/groups_v2/utils.rs:14:78
   |
14 |         hkdf.derive_secrets(group_id, b"GV2 Migration", GROUP_MASTER_KEY_LEN)?;
   |                                                                              ^ doesn't have a size known at compile-time
   |
   = help: the trait `Sized` is not implemented for `[u8]

Relicense as AGPLv3

We have plans to move to the libsignal-service crate which brings native support of Signal. This would remove the usage of signal-cli java library (which btw. is also distributed under GPLv3, but is not used directly, just through exec calls). The libsignal-service crate is in progress of relicensing to AGPLv3 atm (whisperfish/libsignal-service-rs#72).

Bug: infinite loop while skkiping words on input box

Tested on latest master.
Steps to reproduce:

  • Write two words on the input box, the second one must contain a multi-byte character, like an emoji or an accented character.
  • Put the cursor back at the beginning.
  • Move forward two words with Ctrl + Right

At this point the UI is frozen and consuming 100% cpu.

Document all shortcuts

Document all shortcuts in the README (or other document linked from README).

As a follow-up, add a screen showing all shortcuts. The screen should be an overlay shown by shift+? and discarded by escape.

Sync contacts on initial device linking

At the moment this is not done and after linking, gurk does not have any channels and is empty. I am not sure where it has to be done though: in presage or in the app itself. Maybe, presage could do it transparently on the first linking.

Config is not created on first run

I may have run gurk before I had signal-cli installed.

When I run gurk now I get the message, "Error: config file not found at one of the default locations".

Is there a way to force it to think this is my first run?

Unable to send reaction

On both the current master branch, the reaction feature seems to be broken.

When sending a reaction, it correctly appears locally but seem not to get sent as it does not appear on any other device.

After experimenting a bit with the code, it seems that adding

timestamp: Some(timestamp),

in the message

gurk-rs/src/signal.rs

Lines 168 to 176 in eda8557

let mut data_message = DataMessage {
reaction: Some(Reaction {
emoji: Some(emoji.clone()),
remove: Some(remove),
target_author_uuid: Some(target_author_uuid.to_string()),
target_sent_timestamp: Some(target_sent_timestamp),
}),
..Default::default()
};

solves the issue.

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.