Commit Graph

1425 Commits (41e4154d60fa3018c8907a69d8d169de2c134214)

Author SHA1 Message Date
lilia 18a5ce8e54 Restyle conversation panel
// FREEBIE
9 years ago
lilia 760bfffb50 Show all contacts all the time
Contacts without conversation identity appear in alphabetical order at
the end of the inbox.

// FREEBIE
9 years ago
lilia b4960b29d8 Remove newContact attribute
This was used as a flag by a UI that no longer exists. Now it
erroneously gets saved when creating a conversation from a bare phone
number.

// FREEBIE
9 years ago
lilia 8b3596b956 Delete last timestamp on a convo when deleting messages
// FREEBIE
9 years ago
lilia 6f3f33657a Don't mark read on sync messages
There's no longer a need for this since we have read-state syncing.

// FREEBIE
9 years ago
lilia d84400777f Tweak storage logging statement
// FREEBIE
9 years ago
lilia 7fb4d3d8aa Load all inbox convos before rendering
This is a better alternative to the fix in 0434c4b, which causes
problems when creating a new conversation from entering a phone number.

// FREEBIE
9 years ago
lilia 762cb68721 Serialize sending and adding messages to a convo
Previously, if a message was sent in between the receive time of an
incoming message and the time it is actually added to the conversation's
message collection (which only occurs later after several async
callbacks), the incoming message would be inserted not-at-the-end of the
collection since it is ordered by receive time. This tricked the front
end into assuming the message was an older message instead of a new one.

Fixes #490

// FREEBIE
9 years ago
lilia f9a3c7817e DRY up early receipt processing
// FREEBIE
9 years ago
lilia 67900753d1 Log sending read receipts
// FREEBIE
9 years ago
lilia 50731439a9 Turn off session logging
// FREEBIE
9 years ago
lilia 2128ee63aa Update libaxolotl
// FREEBIE
9 years ago
lilia 84235ef58e Use forEach instead of loop
// FREEBIE
9 years ago
lilia c02054d5da Pass ciphertext as ArrayBuffer instead of string
// FREEBIE
9 years ago
lilia 6053fe67ba Use built-in string conversion on protobuf
In lieu of a global helper.

// FREEBIE
9 years ago
lilia 3e0bce2b21 Move, rename, and simplify toArrayBuffer helper
This function is only ever used to convert groupIds from strings to
array buffers in sendmessage.

// FREEBIE
9 years ago
lilia 7dff9ac51b Update libaxolotl
// FREEBIE
9 years ago
lilia 151b9797f6 Perform components concatenation missed in ec6948
// FREEBIE
9 years ago
lilia 0434c4bc53 Fixes #663 Conversation list loads in reverse order
The onChangeActiveAt listener promotes newly activated conversations to
the top of the inbox. By firing on an 'add' event, if the conversation
list happened to load after the inbox frontend was initialized, each new
entry would be incorrectly moved to the top, effectively reversing the
list.

// FREEBIE
9 years ago
lilia 1b72ef6170 Restore notifications heading
// FREEBIE
9 years ago
Blake Griffith 0ceb8e7038 i18n notification's settings dialog
FREEBIE
9 years ago
Blake Griffith 24e4d9c615 'off' -> 'disable notifications' in settings
FREEBIE
9 years ago
lilia 7578991f4e Remove emoji logging
// FREEBIE
9 years ago
lilia 57d64fe669 Fix session corruption due to database races
Prevent races between encrypt and decrypt calls, and other read/write
operations on the session store by serializing session io ops per
device.

Possible fix for #535

// FREEBIE
9 years ago
lilia f0539fda52 Fix exception when drawAttention is called too early
// FREEBIE
9 years ago
lilia 28c82531d3 Allow promises to handle identity removal failure
Previously this exception was thrown in a callback which did not
propogate it up to the enclosing promise.

// FREEBIE
9 years ago
lilia a98de39173 Warn if writing to storage too early
// FREEBIE
9 years ago
Sam Lanning 662020ce68 Add title text for emoji in messages.
Fixes #250

// FREEBIE
9 years ago
Sam Lanning 7b1c06538d Updated twemoji to v1.4.2
This allows us to define the "attributes" option, allowing for emoji titles.

// FREEBIE
9 years ago
lilia 0763cf14a3 Remove messages from notifications when read
Remove individual messages from Notifications when marked read.
Previously this was only done from the conversation model when marking
the entire conversation as read.

Fixes #717

// FREEBIE
9 years ago
lilia fd8bac2003 Fix conversation list ordering
Order conversation list by timestamp instead of active_at. The former is
the send time of the most recent message. The latter is typically the
receive time of that message. This can cause mis-ordering if you send a
message while processing a backlog of incoming messages.

Fixes #617

// FREEBIE
9 years ago
lilia 5f07c74f1a Add log statement when opening provisioning socket
Make it more obvious via logs which server someone is attempting to
register with (i.e., to disambiguate staging from prod).

// FREEBIE
9 years ago
lilia 9ea9a8160b Add logging when opening inbox
// FREEBIE
9 years ago
lilia 2b7cbef8b1 Rename a function
Avoid confusing this operation with actual receipts, which are something
else.

// FREEBIE
9 years ago
lilia b77d5df4f2 Fix markRead when messages have not been loaded yet
Query the database and not just the in-memory messages.

// FREEBIE
9 years ago
lilia 01053335ac Don't send empty read status reports
// FREEBIE
9 years ago
lilia f88b33a135 Fix unread message lookup in markRead
// FREEBIE
9 years ago
lilia c4a88dd651 Fix getUnread query
Booleans are not valid keys in indexeddb.
https://www.w3.org/TR/IndexedDB/#dfn-valid-key

// FREEBIE
9 years ago
lilia 8fdf58971c Add missing semicolons
// FREEBIE
9 years ago
lilia c3bbdb393f Refactor media uploading step
Move this to its own function which encapsulates the error handling for
it.

// FREEBIE
9 years ago
lilia 44b1a6451d Add validation to Message class
// FREEBIE
9 years ago
lilia 2e30c4388f Set destination on end session messages for syncing
// FREEBIE
9 years ago
lilia e91f646920 Fix initial post-sync timestamps
Fixes #669

// FREEBIE
9 years ago
lilia d121effe3b Add logging for clearing taskbar attention
// FREEBIE
9 years ago
lilia 71467822f6 Clear key conflict before replaying it
Don't save the change until we successfully process the message, but
make it first so that the user sees the error disappear when the new key
is accepted.

// FREEBIE
9 years ago
lilia f7191ad9de Clear notification when the last one is removed
Previously, we switched to not updating the notification popup on a
removal, since this usually respawns a new notification popup
unexpectedly. However, when the last relevant notification is cleared
(ie, by opening/reading the thread before the notification times out and
disappears on its own) we should clear the existing popup if there is
one.

// FREEBIE
9 years ago
lilia 1f897f32b7 Track and sync unread messages
// FREEBIE
9 years ago
lilia 1be45f3775 Derive global unread count from individual counts
// FREEBIE
9 years ago
lilia 781ada64ca Add libtextsecure support for syncing read messages
Plumbing for sending and receiving a new sync protobuf for marking
messages read on/from my other devices.

// FREEBIE
9 years ago
lilia ecf2885a6c Do post-send tasks when resolving conflicts
Fixes #684

// FREEBIE
9 years ago
lilia 731052ad0a Clear old key conflict errors after failed replay
If the replay failed due to a bad mac or other decryption error for some
other reason we still want to clear the conflict. If it failed because
it's still in conflict then the newly returned error will reflect that
and be saved.

// FREEBIE
9 years ago
lilia cc0b8e835a Don't show left groups in list of all contacts
// FREEBIE
9 years ago
lilia ef9559d844 Add tests for filtering left groups from search
// FREEBIE
9 years ago
lilia 7e8ce5eb54 Omit left groups from search
Unless they contain messages.

// FREEBIE
9 years ago
lilia 010297f4c5 Track groups I've left
// FREEBIE
9 years ago
lilia f940676357 Ignore attempts to post empty debug logs
Fixes #697

// FREEBIE
9 years ago
lilia a962d97bfb Fix debug log submission loading UX
This flow broke a bit with transition to modal debug log.

Restructure such that the loading class can be applied to an appropriate
element inside the modal. Ensure that the input elements are hidden when
submit is clicked, the result elements are shown when the log upload is
completed.

// FREEBIE
9 years ago
lilia 7f8c76faca Make debug log as big as possible
Tweak style to make the modal reasonably wide/tall, and use flexbox
to automatically expand the textarea.

// FREEBIE
9 years ago
lilia 636c0f2a60 Put debug log in a modal
Also dedupe close-button style

// FREEBIE
9 years ago
lilia 33fde3d4e7 Dedupe modal styles
// FREEBIE
9 years ago
lilia 74aeddcbda Add missing view file
// FREEBIE
9 years ago
lilia 173e037fa6 Fix minor style errors
And keep it that way, by making jscs config more opinionated.

// FREEBIE
9 years ago
lilia 18e9ded296 Fix storage.put
Adding an existing id to a collection is a no-op. To update an existing
item, we must pass {merge: true} as an option.

// FREEBIE
9 years ago
lilia a3c6061480 Add Notification Settings
Fixes #471

// FREEBIE
9 years ago
lilia 4ab2e25df6 Refactor Contact and Conflict views
Untangle these two views into their component parts, consolidating all
the key conflict logic in the key conflict view. Contact view now simply
renders basic contact info and miscellaneous errors but not conflicts or
message errors.

// FREEBIE
9 years ago
lilia 1e1b87bbbd Add session store logging
// FREEBIE
9 years ago
lilia 1bd0855d93 Remove duplicate display of network errors
Network errors render as a resend dialogue at the top of the message
detail and need not be re-reported in the contact list or errors
section.

// FREEBIE
9 years ago
lilia f221921127 Tweak conflict style
// FREEBIE
9 years ago
lilia 28c763992a Move error indicators on message bubbles
// FREEBIE
9 years ago
lilia 5340791868 Display key conflict dialog inline
One less modal.

// FREEBIE
9 years ago
lilia ad66da9fb5 Move identity conflicts to top of message detail
Also restyle them as with network errors

// FREEBIE
9 years ago
lilia f5436a5123 Clicking on message status icon opens detail view
Additionally, hovering over it will apply cursor: pointer. Previously
only the timestamp exhibited this behavior.

// FREEBIE
9 years ago
lilia 496ac30d6f Process delivery receipts from yourself
Fixes #668

// FREEBIE
9 years ago
lilia cd7bc78b1d Refactor delivery receipt processing
Replace the where, forEach, and found pattern with a find.

// FREEBIE
9 years ago
lilia b602533084 Serialize calls to sendSyncMessage
Fixes #679

// FREEBIE
9 years ago
lilia 6154dbb8db Fix debug log growing uncontrollably
Races between adding new log entries and fetching old ones can cause an
overage of more than one entry.

// FREEBIE
9 years ago
lilia b8602a3b42 Make migrations more robust
Occasionally these will fail if they happen to be executed before the
necessary dependencies (storage, ConversationCollection) are declared.

// FREEBIE
9 years ago
lilia 48626ceafb Remove spurious storage.fetch from migration
This should really only be called once, from background.js.

Calling it twice can cause doubled listeners for the registration_done
event, which in turn leads to duplicate post-registration callbacks,
dual sync requests, and an eventual datastore inconsistency.

Fixes #670

// FREEBIE
9 years ago
lilia 1f2dfc5ea9 Only update notification on add
Previously, notifications were persistent until explicitly dismissed
from the notification center (a bell icon in the system tray), but that
ui has been removed from chrome*, so now updating on remove is
unexpectedly creating a new notification pop up.

*http://blog.chromium.org/2015/10/streamlining-notifications-on-desktop.html

Fixes #667

// FREEBIE
9 years ago
lilia 4198987723 Display a message when provisioning socket fails
Fixes #464

// FREEBIE
9 years ago
lilia 7e82d1295c Handle attachment upload errors
Adds a new kind of replayable error that handles retry of pre-encryption
failures, e.g., attachment upload.

Fixes #485

// FREEBIE
9 years ago
lilia 910e37649a Let group messages use new Message class
// FREEBIE
9 years ago
lilia 3bffdd96f5 Add sendMessage to handle sending from Message class
// FREEBIE
9 years ago
lilia ecdfa09e97 Create a helper class for constructing messages
// FREEBIE
9 years ago
lilia b73a3aea80 Fix syntax error
// FREEBIE
9 years ago
lilia cee2b3163a Add missing bind in messageReceiver
// FREEBIE
9 years ago
lilia 7dcad67410 Fix handleSentMessage
Missing a bind in 27fe7e3.

// FREEBIE
9 years ago
lilia d4760452d1 Add signal agent to server requests
// FREEBIE
9 years ago
lilia 7bab669ef0 Rebuild components
// FREEBIE
9 years ago
lilia 27fe7e355e Process end session flags in sync messages
Because remote clients will delete all sessions in response to an end
session message, regardless of which device it came from, when our
linked device sends an end session message, we must also end all
sessions with the destination.

This change moves the end session flag processing to processDecrypted,
which is shared between handlers of sent messages, data messages, and
messages which are re-tried after resolving identity conflicts.

// FREEBIE
9 years ago
lilia fe82e469f2 Make end session consistent with android
Close all the sessions for a number when receiving an end session
message.

// FREEBIE
9 years ago
lilia bf632bfa54 Fix migrations
Migrations should always call next() exactly once.

// FREEBIE
9 years ago
lilia 87ddcef333 Make debug log persistent
Save log entries in indexedDB rather than just in memory. Reload them
whenever the background page is refreshed.

// FREEBIE
9 years ago
lilia 86132a38a8 Log envelopes and session end events
Help debug bad session errors by logging some envelope info about the
message we are about to decrypt. With this, if there is a decryption
error (e.g., bad mac or no session) it is clear from the logs what
number and device message sent the bad message.

Also log when we send and receive end session messages and when we close
sessions for certain devices.

// FREEBIE
9 years ago
lilia 137b992f87 Fix "Delete Messages" not deleting all messages
Since the introduction of infinite scroll, the delete messages function
has only deleted the currently loaded set of messages in a conversation.
To fix this, we should fetch all the messages and then delete them.

Fixes #645

// FREEBIE
9 years ago
lilia 080c233a93 Add timestamp update interval test
Break out delay computation into its own function and add tests,
including a regression test for #646.

// FREEBIE
9 years ago
codedust 9b390baea0 Fix a bug that causes 100% CPU load in timestamp_view.js
When `millis_since` becomes larger than one week, `delay` becomes
negative and is set to Zero. This causes an infinite loop and therefore
100% CPU usage (single thread).

// FREEBIE
9 years ago
lilia b0def76801 Remove unused code
Well that never worked.

Closes #458

// FREEBIE
9 years ago
Lorenz Hübschle-Schneider e876d8f6ed Display relative timestamps in conversation list
This mimicks Signal-Android's relative timestamps.
Previously, only the date was displayed.

Fixes #284
9 years ago
Sam Lanning 0569d4c889 Replace conversation panel js resizing with flex styling.
// FREEBIE
9 years ago
Sam Lanning c4a9ac94b4 Improve Confirmation Dialog
Some basic modifications to the Confirmation Dialog:
* Always attached to <body> regardless of view that called it.
* Always centered horizontally on screen.
* A black semi-transparent overlay is now displayed over everything, and under
  the dialog.
* Various other style changes.

fixes #389

// FREEBIE
9 years ago
lilia 9d644d4037 Update libphonenumber
Fixes #531

// FREEBIE
9 years ago
lilia a9cba1471a Update our own key on re-install
Previously we would delete our own key from the trust store when
re-linking, in case it changed. We can also immediately take one step
further and store the new key. Typically this happens in the course of
requesting sync info from the master device, except in the case of
standalone clients.

Closes #596

// FREEBIE
9 years ago
lilia 43071d94d6 Log invalid number inputs
// FREEBIE
9 years ago
lilia 05681ce35b Don't render placeholder markup unless necessary
Rather than always rendering divs for the key and placeholder, render
the placeholder only if the key is missing.

// FREEBIE
9 years ago
jakob 6c7f2cf0fc Show help text for unknown contact identity
Adds a new message string "theirIdentityUnknown".

Fixes #576

// FREEBIE
9 years ago
2-4601 ea0e013e81 Add a trifle of i18n to KeyVerificationView
Two strings were left behind:
- "Their identity (they read)"
- "Your identity (you read)"

I saved them.

// FREEBIE
9 years ago
Sam Lanning ac25b62fdc Improve implementation of i18n for Install Flow following comments on #611
* Move install flow i18n logic to install_view.js (from options.js)
* Switch to using placeholders (instead of jQuery) for i18n messages with html.
* Switch to using moustache template instead of jQuery for i18n substitution.

// FREEBIE
9 years ago
Sam Lanning 0825d3e22f Implement i18n for Install Flow
Fixes #600

// FREEBIE
9 years ago
lilia 3a494bf2a3 Log when we draw attention to the window
Hopefully help debug spurious cries for window attention.

// FREEBIE
9 years ago
lilia 7301a4c0fb Quick fix for inbox not opening on launch
Fixes #610

// FREEBIE
9 years ago
lilia 30aa13079f Fix sync request argument check
Fixes #609

// FREEBIE
9 years ago
lilia 34ae81c30d Redo previous migration
This time, wait for storage to be ready.

Fixes #608

// FREEBIE
9 years ago
lilia d6da77b6f4 Throw exception on bad args to SyncRequest
// FREEBIE
9 years ago
lilia 1b68e652cc Fire group sync completion event despite errors
Sometimes an error is thrown while processing groups from a group sync
message. We still want to fire the groupsync event when we're done
handling all the data, even if some of it was bad.
9 years ago
lilia 75b2c9c5de Fix crash when removing a listener
// FREEBIE
9 years ago
lilia f7c4fd2fed DRY up event target implementations
Dedupe event target code and make it extensible.

// FREEBIE
9 years ago
lilia 925c1bdb33 Add SyncRequest class
Similar in function to an xhr request, a textsecure.SyncRequest object
is initialized from a message sender and receiver pair and initiates a
request for sync from the master device. It later fires a success event
when both contacts and groups are done syncing, or a timeout event after
one minute.

// FREEBIE
9 years ago
Karel Bilek d8381cfc47 Dispatch an event after processing a group sync
Related #521
9 years ago
lilia 6a268f0325 Migrate registration state
Follow up to 5223e6e for existing installations that never set this flag.

// FREEBIE
9 years ago
lilia cdd139b44c Refresh group contacts when rendering member list
Fix #581

// FREEBIE
9 years ago
lilia b2bed9c51c Fix display of empty group updates
Group updates in which nothing change should still display 'Updated the
group'. Previously they would display as empty message bubbles. Fixed by
ensuring that the 'group_update' attribute is set on the model, even if
it is an empty object.

// FREEBIE
9 years ago
lilia 5223e6ed30 Stop ask to re-link forever
Clear the registration flag when we detect that our credentials have
been invalidated, but retain the knowledge that we've been registered
before, so as to preserve post-first-install behaviors like skipping the
introductory install screens, and accessing the main ui.

Fix #541

// FREEBIE
9 years ago
lilia 96520e9fd4 Move envelope decode before ack
We should not ack envelope protobufs that fail to decode correctly. If
the server happens to send us such a thing it probably indicates a
protocol mismatch between it and the client, in which case the client
needs to update and re-receive the failed message.

// FREEBIE
9 years ago
lilia 44824df6cb Refactor for clarity
// FREEBIE
9 years ago
Matt Corallo dac084b604 Send message ACKs immediately after recv, instead of after process 9 years ago
Felix Epp a65166ae3b Fix #583 from/to label translatable
I just added i18n calls and the corresponding keys for en + de.
9 years ago
lilia ceaf94e05b Rename variable for consistency
// FREEBIE
9 years ago
Felix Epp 62af9ff678 Add user-agent string to DebugLog // fixes WhisperSystems/Signal-Desktop#404
The user-agent string includes the information needed (OS + Chrome version) and the console.get() function seems just right. The debugLog itself is not manipulated.
9 years ago
Karel Bilek 557d33bf88 Fixing upper bounds on contact search (fixes #545) 9 years ago
lilia c6956f81d0 i18n DebugLogView
// FREEBIE
9 years ago
lilia 1d6e391dd6 Prefer single quotes
// FREEBIE
9 years ago
lilia 0e2d2d60c2 i18n KeyConflictDialogue
// FREEBIE
9 years ago
lilia 3172c49436 i18n ContactView
Part of the MessageDetailView

// FREEBIE
9 years ago
lilia d502f1bdee i18n KeyConflictView
Also refactor generic error view to make this simpler.

// FREEBIE
9 years ago
lilia ccdbfc3e12 i18n AttachmentView
// FREEBIE
9 years ago
lilia 47e33a14ac i18n UnsupportedFileTypeToast
// FREEBIE
9 years ago
lilia 42f15011fa i18n FileSizeToast
// FREEBIE
9 years ago
lilia 4066223d72 i18n SocketView
// FREEBIE
9 years ago
lilia 836a7cb8c5 i18n InboxView
// FREEBIE
9 years ago
lilia 85eb5c4d59 i18n KeyVerificationView
// FREEBIE
9 years ago
lilia 95e47dace1 i18n GroupMemberListView
// FREEBIE
9 years ago
lilia 73ea415e95 i18n ConfirmationDialogView
// FREEBIE
9 years ago
lilia ea9fa00658 i18n MessageDetailView
// FREEBIE
9 years ago
lilia 0a43e9e8b2 i18n EndSessionView
// FREEBIE
9 years ago
lilia 02cc6623ea i18n ConversationView
// FREEBIE
9 years ago
lilia e9d3272e87 Prepare for i18n
// FREEBIE
9 years ago
lilia d03d6fb7a5 Fix autolinking for urls with non-English characters
Fixes #559

https://url.spec.whatwg.org/#url-code-points

// FREEBIE
9 years ago
lilia 3d55f2c125 Update libtextsecure
Recompile missed in 093eb00

// FREEBIE
9 years ago
lilia 881aa1685d Fix up unsupported attachment rendering
Rather than simply displaying an inactionable error, render a link that
allows the user to save the unsupported attachment.

// FREEBIE
9 years ago
David Baldwynn 8251db6ae6 Added error message for unsupported attachment type (issue #419) 9 years ago
lilia 04359c9184 Remove received_at from message detail on outgoing messages
Only show sent_at for outgoing messages, matching Android.

The received_at timestamp reflects the time a message was saved locally.
It is necessary on both incoming and outgoing messages for sorting
purposes, but can be confusing in the context of an outgoing message
detail view, since users don't think about themselves "receiving" their
own messages, and may even interpret this as the time that a message was
received by their conversation partner's device.

// FREEBIE
9 years ago
lilia ed4015f919 Return early from previewImages for unsupported files
// FREEBIE
9 years ago
lilia fa6d6974ed Discard unsupported files
Fixes #534

// FREEBIE
9 years ago
lilia d95f869d62 More logging
// FREEBIE
9 years ago
lilia 51fc10abb6 Don't wake up to check messages if not registered
This chrome alarm business is in place to help us wake up and check for
messages when running in the background. Without it, chrome will suspend
our app after a short period of inactivity. Upon waking, if the app
discovers it is not linked, it prompts you to link it. However, if
you've declined registration (i.e., because you already maxed out your
linked device limit, but chrome auto-added the app to another machine),
we should just wait until explicitly launched again.

Fixes #519

// FREEBIE
9 years ago
lilia d201c65f7c More verbose logging in message receiver
// FREEBIE
9 years ago
lilia bc576e18d5 Fix no delivery receipts on close session messages
// FREEBIE
9 years ago
lilia a23e862e62 Clear dock/taskbar attention on window focus
Fixes #440

// FREEBIE
9 years ago
lilia dabe51fd68 Mark message sent iff at least 1 recipient got it
Previously, we would always mark a message sent even if all our network
requests failed.

Fix #484

// FREEBIE
9 years ago
lilia 63135a2337 Fix race between sync messages and receipts
Previously, when processing a backlog of sync messages and their
delivery receipts, we would fail to mark some messages as delivered even
though we got a receipt. This was due to an async race condition between
saving a sync message and fetching it after the receipt arrives.

Fix by re-ordering idb requests such that we save the message first and
fetch it after.

Fixes #479

// FREEBIE
9 years ago
lilia 077cba284f Ignore delivery receipts from myself
// FREEBIE
9 years ago
lilia a137415b7a Fix standalone registration
// FREEBIE
9 years ago
lilia 77caa63321 Normalize views' template fetching pattern
Typically, a view can specify its templateName and then use the default
render method on Whisper.View, except in some special cases like message
view or message detail where other operations are performed during
render.

// FREEBIE
9 years ago
lilia 61a57a753b Provide user feedback when number is invalid
While typing a number, the new contact element is faded out. When the
number becomes valid it is opaque. If the element is clicked while
invalid, it displays 'Invalid number' and waits for the input to change
again. A new conversation is only opened if the number is valid.

// FREEBIE
9 years ago
lilia 01593363eb Add migration to update search tokens
Previous commit changed the token schema slightly so now we need to run
a migration to update existing conversations.

// FREEBIE
9 years ago
lilia 720032bb8e Remove id from search tokens
Instead, just strip the leading + from search queries that look like
numbers.

// FREEBIE
9 years ago
lilia a258f1a66b Refactor number parsing and validation
Refactor libphonenumber.validateNumber into libphonenumber.parseNumber,
which encapsulates the try-catch pattern used in number parsing and
returns an object of info about the input number rather tha throwing
since we expect to get some invalid number inputs the user is typing.

In the conversation model,
  * Separate phone number validation from search token updating.
  * Perform token update before save if the number was valid.
  * Stop storing unneeded number variants as conversation properties.

// FREEBIE
9 years ago
lilia 7dd0fb70b5 Remove unused code
Here lies the remains of the old compose flow, which must eventually be
restored for group creation flow, but will likely be rewritten entirely.

// FREEBIE
9 years ago
lilia 65c13adf5e Fix searching for numbers with parens or dashes
Strip some punctuation from search queries

// FREEBIE
9 years ago
lilia 3d98b54027 Create contact from number with common punctuation
The 'Create new contact' option should now appear for numbers including
parens and other common punctuation.

// FREEBIE
9 years ago
lilia ae52c047bf Clean up open-event logic with new convos and search results
Search view triggers an open event when a valid phone number is entered
and the 'Create new contact' card is clicked.

Inbox view should listen and respond to this event. It should also
disregard select events on the new contact element since those are fired
before phone number validation.

Finally, the search view can stop listening to select events because the
inbox view is already doing so.

// FREEBIE
9 years ago
lilia af64784d64 Let search match on full e164 format numbers
// FREEBIE
9 years ago
lilia 0b7742ecd7 Create contact by number with no country code or +
Search box finds or creates a conversation given a phone number in
local (to the user's region) or international format.

Previously you had to enter e164 format to set up the conversation
correctly.

If the number is not valid, do not open the conversation.

TODO: user feedback on invalid numbers.

// FREEBIE
9 years ago
lilia 0b95606eff Display nicely formatted phone numbers
In conversation headers and as titles for contacts with no name. Updated
tests accordingly.

// FREEBIE
9 years ago
OdysseasKr f2d2e08fa2 Fix code styling 9 years ago
OdysseasKr 652d0963fc Add drag and drop support for text
By adding the drag and drop support for media files, the default
event handlers were overwritten. Thus drag and drop did not support
text. Now, the drag and drop listeners revert to the default behaviour
when the user does not drag a file.

Resolves: #478
9 years ago
lilia 9031b4c10c Update libaxolotl
Fixes #477

// FREEBIE
9 years ago
lilia ea980b4385 Don't surface invalid attachment urls to the user
Log them, but don't put display them in user-facing error ui.

// FREEBIE
9 years ago
lilia 7b1268e5f7 Log incoming invalid attachment urls also
Same as previous commit but for incoming.

// FREEBIE
9 years ago
lilia fe7505c050 Log invalid attachment urls
// FREEBIE
9 years ago
OdysseasKr cbbb8dfa24 Add drag and drop for attachments
Files can be dragged and dropped on the bottom in order to be added as
attachments.

Resolves: #260
9 years ago
lilia ae3a834b4c Log global errors
Use the global error handler, window.onerror, to catch miscellaneous
exceptions and pipe them into the debug log.

Fixes #456

// FREEBIE
9 years ago
lilia c1aada4f0f Don't request background page from background page
This file is loaded by the background page, which means it is already
bound to the background page's global context. This was not true at some
time in the distant past but is true now.

// FREEBIE
9 years ago
lilia 85285a1094 Inline a one-line function only used in one place
// FREEBIE
9 years ago
lilia 9c59dfda93 Remove duplicate case statement
This line was never being hit due to the duplicate one above (#L166).
Peeking at the server code shows that 403 is only given in response to
registration attempts, where it does in fact indicate an invalid code.

// FREEBIE
10 years ago
lilia 68f2505996 Display phone number in conversation header
Fixes #436

// FREEBIE
10 years ago
lilia 0620f08a7c Save single errors returned from send functions
// FREEBIE
10 years ago
lilia 2f469835d9 Handle group quit sync messages
Previously, we would incorrectly reject group updates originating from a
linked device instructing us to remove ourselves from the group.

// FREEBIE
10 years ago
lilia edcb28aebb Don't save a MessageCounterError
Fixes #446

// FREEBIE
10 years ago
lilia 999e084727 Serialize notification updates
// FREEBIE
10 years ago
lilia d0b1aa3829 Silently remove read messages from existing notifications
Previous commit removed notification models from the global collection
but did not actually update the existing notification.

This commit refactors the notification interface to allow us to update
it without re-surfacing the notifcation onscreen.

// FREEBIE
10 years ago
Georg Semmler 1a6cedac56 Fix #402
Remove messages which are read from the notification
10 years ago
lilia b00d5289cf Save message timestamp for resending
Fix bug where resending due to failed network connection would fail
silently.

Broken in 7b6820 refactor which changed arguments to transmitMessage

// FREEBIE
10 years ago
lilia db773dd8a7 Fix selected state transition on firstRun
// FREEBIE
10 years ago
lilia 8d214b73d9 Render conversation placeholder hint in place
// FREEBIE
10 years ago
lilia 891a5e54ad Add hint for users with no groups or contacts
If you have no contacts or groups, display a hint about phone numbers.

// FREEBIE
10 years ago
lilia e9949152bb Always return a promise from sendSyncMessage
// FREEBIE
10 years ago
lilia acae4afce3 Handle invalid responses better
Depending on the response code, returning an HTTPError here will let us
retry later, if appropriate.

// FREEBIE
10 years ago
lilia 7bf94c33d5 Show all contacts when inbox is empty 10 years ago