Commit Graph

1241 Commits (2bdd0106e70845f21369abefc7a4b9fb02f72b9c)
 

Author SHA1 Message Date
lilia 2bdd0106e7 Add comments
// FREEBIE
10 years ago
lilia eb1cfe9b70 Move notification listeners to background
Otherwise they will be re-registered by the frontend page.

// FREEBIE
10 years ago
lilia 3bf9e36ead Move function declarations out of storage.onready 10 years ago
lilia c8e51563a0 Refactor initial sync codepath to application layer
To reduce dependence on the message sending module, AccountManager
should send no sync requests itself.
10 years ago
lilia 6123c419d0 Remove refreshGroup
1. This is nonstandard behavior, not supported by any other clients. It
   may help sometimes but will also cause bugs (see 2)

2. iOS doesn't handle group updates with missing fields. all fields must
   be populated, and libtextsecure doesn't have any knowledge of the group
   name or avatar, so these updates will clobber group state on iOS.

// FREEBIE
10 years ago
lilia 94e1c2d123 Remove check for .humanError property
This property is no longer used by any of our errors.

// FREEBIE
10 years ago
lilia 6547538458 Use foreach instead of a loop
This syntax makes plain that the function is not used anywhere else,
and increases linearity/readability.

// FREEBIE
10 years ago
lilia acaf7b8de2 Refactor relay consistency check
Check the device list for relay consitency and throw an exception before
attempting to encrypt to any of the mismatched devices.

// FREEBIE
10 years ago
lilia bafc61600c Refactor sendMessageToDevices
Leverage map and Promise.all for more concise and linear code flow.
10 years ago
lilia 9ff95c7e61 DRY up group update sending
// FREEBIE
10 years ago
lilia f00d118c93 More logging
// FREEBIE
10 years ago
lilia f6b35ffbfc Log error stack traces
// FREEBIE
10 years ago
lilia 213dbdefd2 Reorder functions
// FREEBIE
10 years ago
lilia 62c90e3925 Don't save/log websocket error
It's a generic error Event and doesn't actually contain anything useful.

// FREEBIE
10 years ago
lilia 289b82d1dc Expose messageReceiver.close
// FREEBIE
10 years ago
lilia 1d370857fc Remove unused callback arguments
Unused since d0fd3e94 afaict.

// FREEBIE
10 years ago
lilia 2204ef863d Fix event name
We successfully retry after a websocket connection closes, but this typo
prevented us from retrying if the websocket simply never opened.

// FREEBIE
10 years ago
lilia d1191c509c Log outgoing errors individually
// FREEBIE
10 years ago
lilia ada3d999e0 Log outgoing errors
// FREEBIE
10 years ago
lilia ce49d14d85 Fix leave group bug
This one's been around since forever, but only manifests when someone
leaves the group and comes back. In that case we fail to reinit their
numberRegistrationId object, which causes a npe when we try to send
send them group messages.

Affected parties must ask their fickle friends to leave/join again.

// FREEBIE
10 years ago
lilia 4a482243d0 Simplify event arguments
// FREEBIE
10 years ago
lilia c8a76ab38e Fix websocket event handler name
// FREEBIE
10 years ago
lilia 21667d9181 Log when we start waiting for an online event
// FREEBIE
10 years ago
lilia 823f570955 Add more websocket debug logging
// FREEBIE
10 years ago
lilia f70e844cef Include url in http response logging
Otherwise it's impossible to tell which is which, especially when
sending group messages.

// FREEBIE
10 years ago
lilia d8803ee31f Mark leave group messages as sent
// FREEBIE
10 years ago
lilia b1d3829651 Update minimal window dimensions
Some day we'll probably lower these minimums but first we'd need a more
responsive design.

Fixes #310

// FREEBIE
10 years ago
lilia 960754ef04 Restyle compose button
Move it to a tool bar at the top of the conversation list. This is also
where a search bar will live someday.

Fixes #357

// FREEBIE
10 years ago
lilia 2243c09fea MessageReceiver is an event target
Rather than asking for a global target, the message receiver implements
the EventTarget interface itself. It does not expose the dispatchEvent
method, however. This ensures that events can only be triggered from
within the internal MessageReceiver class, which means we no longer need
to namespace them.

// FREEBIE
10 years ago
lilia a925027cd2 Refactor MessageReceiver for storage/server independence
Let the libtextsecure consumer pass in their own server url, username,
password, and signaling key, as with libtextsecure-java.

Also brings reconnect logic up into the MessageReceiver class, which
is the only place it should apply.
10 years ago
lilia e59a5792d5 Don't hardcode the attachment host 10 years ago
lilia 184e37383c Don't auto-populate the relay field
According to server api docs, relay is optional when it is the same as
our own server.

// FREEBIE
10 years ago
lilia 7d9cf0c167 Pass the signaling key into decryptWebSocketMessage
De-couple this file from dependency on storage.
10 years ago
lilia c167fc964d Revert "Remove global updateInbox method"
This reverts commit 1c70293bba.

This broke tests by blocking the database deletion during test
setup.
10 years ago
lilia 87ce3241c8 Remove script-tag for nonexistant test
// FREEBIE
10 years ago
lilia 310f40fcad Contact sync should update existing contacts
// FREEBIE
10 years ago
lilia 7f4ef6e9e7 Remove double-check of unread count
This same condition is already enforced in the markRead method.

// FREEBIE
10 years ago
lilia 1c70293bba Remove global updateInbox method
This operation now needs to be done exactly once, at startup, so we
don't need to expose a global method for it.

// FREEBIE
10 years ago
lilia 6364cda7cb Create requires an object
// FREEBIE
10 years ago
lilia 78d7296f84 Fix tests
// FREEBIE
10 years ago
lilia b617240338 Stop calling updateInbox all the time
Now that the inbox collection keeps itself in sync, we don't have the
data duplication that was forcing us to reload constantly.

// FREEBIE
10 years ago
lilia 537f0ceef0 Log all http requests at start and end
// FREEBIE
10 years ago
lilia 0017f196ef Move ConversationController to its own file
Encapsulate the global conversation cache collection against accidental
access, avoiding the data-clobbering bug fixed in previous commit.

Also move some one-off program initialization code from panel controller
to background.js

// FREEBIE
10 years ago
lilia 8f28c3af68 Fix disappearing contact info
This errant reference to the global cache of conversations was causing
some contacts to get clobbered.

// FREEBIE
10 years ago
lilia 93a5d01127 Delete old code
We don't have any more 'default' css classes. Default avatar data is
simply provided by a model for rendering in a view.

// FREEBIE
10 years ago
lilia 2bc65c2ab4 Let messages fetch references to senders
The conversation's contactCollection only contains references to the
current membership, and will not provide contact info for people who
have left the group, causing their messages to render without numbers or
avatars.

// FREEBIE
10 years ago
lilia fd29ac8d2c Promote groups to top of inbox when we update them
// FREEBIE
10 years ago
lilia 73983118dc Render emoji in conversation title // Fixes #359
// FREEBIE
10 years ago
lilia 6f94888659 Use online event listener to reconnect more smrtly
No need to retry if we know we're offline.

// FREEBIE
10 years ago
lilia 37998e261d Log more errors
// FREEBIE
10 years ago