Giter Site home page Giter Site logo

signal-csharp / signal-windows Goto Github PK

View Code? Open in Web Editor NEW
107.0 107.0 31.0 2.67 MB

Unofficial Signal Private Messenger for Windows

License: GNU General Public License v3.0

C# 99.89% PowerShell 0.11%
csharp dotnet messaging signal signal-windows universal-windows-platform uwp windows-10 windows-10-mobile windows-phone windows-uwp windows10mobile

signal-windows's Issues

design a proper way to block for db actions

As soon as a message is on the wire, both the receiving and the sending task want to change the message entity to keep track of the status and receipts.

proposal:

  • delay send until message is saved to db
  • use transactions for receipts and status

pro:

  • simple
  • safe

con:

  • increased outgoing delay

registration page needs overhaul

It should:

  • not be ugly
  • not allow wrong usage (e.g. sending verification code before requesting one)
  • allow restarting the procedure
  • notify the user if errors occur

finalizing our first db migration

We should get our first version of the database stable asap, and use migrations if we have to alter something later.

Things we could/should do:

  • rename SignalThread to SignalConversation?
  • switch to ulongs everywhere where foreign keys are involved
  • add a reference to the last unread message of a SignalConversation?
  • create a table for EarlyReadReceipts, since a read receipt might arrive before the message
  • use separate db for the libsignal-protocol-stores?
  • save "special* messages like group/disappearing messages updates and session resets

Signal-Windows crashes when the websocket server closes the connection

tldr: nothing we can fix or workaround, we have to wait for a new System.Net.WebSockets.Client release.

https://github.com/dotnet/corefx/issues/17317

Stacktrace:

System.Exception: Exception from HRESULT: 0x80072EE2
   at Windows.Networking.Sockets.MessageWebSocketMessageReceivedEventArgs.GetDataReader()
   at System.Net.WebSockets.WinRTWebSocket.OnMessageReceived(MessageWebSocket sender, MessageWebSocketMessageReceivedEventArgs args)

refresh prekeys frequently

this needs access to the SignalProtocolStore, which should only be accessed with the SESSION_LOCK acquired.

refactor shutdown code

the resetevents are unneccessary and we can speed up the shutdown if the device is unregistered.

We should save the join handles of our worker tasks and join them on shutdown.

constant message order should be enforced

Currently, the position might change after a restart due to two tasks (receiving and sending) racing for the db, while the UI has to display the message immediately.

Having the UI wait for the db insert to solve the dispute is not an option.

Deferring the db access is also not an option, because the signal server wants its messages confirmed asap, and we want to keep the bookkeeping overhead minimal.

tl;dr:
Constraints:

  • We want the UI to display an outgoing message immediately. This implies that the UI thread must be the one deciding the order of messages.
  • onMessages must not return before the messages are saved
  • insertion of outgoing messages is deferred

Conclusions:

  • receive must coordinate insertion with UI

Possible solution(s?):

  • UI maintains a queue, receive may invoke insertion and block for completion, dedicated task saves to db and unblocks receive

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.