Commit Graph

90 Commits (ac5c35905348e3310abcadc7ad02ba09037aaa2a)

Author SHA1 Message Date
lilia bbe57ef0bf Stringify incoming group ids
Otherwise when we try to make their local storage keys they look like:
"egroupByteBuffer(offset=4,markedOffset=-1,length=28,capacity=112)"
11 years ago
lilia 7e9c0e2394 Group ids should be strings (or stringables)
ArrayBuffer was a bad choice.
11 years ago
lilia 320d1f18ae Fix exception when protbuf-encoding groupIds
An exception is thrown when protobuf tries to encode a number as the
group id, which is declared to have type 'bytes'.

Fix by make it an ArrayBuffer instead, and increase the length to 16,
which is what the Android client uses:

c632b32ff8/src/org/thoughtcrime/securesms/database/GroupDatabase.java (L222)
11 years ago
lilia 5b0573293f Fix references to GroupContext Type ENUM values 11 years ago
lilia e89e691957 Fix bug in groupId generation
Previously, if calling createNewGroup with an undefined groupId,
no groupId was generated.

This occurred because no entry for "group" + undefined exists in
localStorage, which caused this code to think undefined was a
valid group id.

Fixed by adding `|| groupId == undefined` to the while clause.
Also decoupled the groupId collision check for clarity.
11 years ago
lilia 81e4af5827 Move phonenumbery utils to libphonenumber object
Slowly whittling away at helpers.js...
11 years ago
lilia 9fc14cfa30 Remove erroneous comment re: MDN copyright
In fact, the code samples we have copied from MDN are declared to be
public domain (see link below):

  "Code samples added on or after August 20, 2010 are in the public
  domain."

https://developer.mozilla.org/en-US/docs/MDN/About#Copyrights_and_licenses

AFAICT we're using code from this page, last updated 10/4/14:
https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding
11 years ago
lilia 266600e5ab There's no need to wrap this function inside a function afaict 11 years ago
Matt Corallo 28779e0b35 Fix tests by returning promises 11 years ago
Matt Corallo f6f35c5b61 Fix a missing function and dont blow up on delivery receipts 11 years ago
Matt Corallo a6b0d1f84b Add entirely untested secondary device init 11 years ago
Matt Corallo c427da04f0 Add closeSession tests as Alice and fix re-requesting prekeys 11 years ago
Matt Corallo ebcfd4736e Fix session lookup in duplicate prekeymessage case 11 years ago
Matt Corallo 287b55120d First cut of ALICE test vectors 11 years ago
Matt Corallo a8908646aa Fix null flags in v3 11 years ago
Matt Corallo 0d4ae6a8cb Fix undefined variable in for's (browser update to strict mode?) 11 years ago
Matt Corallo de83429962 v3 steps 11 years ago
Matt Corallo 4c3ee6f23b Compare equality w/o getString (in the future) 11 years ago
Matt Corallo b94ba6b726 USE_NACL = true 11 years ago
Marco 13a9329bcf improved number validation (based on google's libphonenumber) 11 years ago
Matt Corallo 1ec6b0aed6 Better TODO wording 11 years ago
Matt Corallo 12a849957a Refresh groups on (probably) new identity key (maybe more often?) 11 years ago
Matt Corallo 0f126fc0f8 Keep track of number->groups, add TODO to refresh, other tweaks 11 years ago
Matt Corallo e495e8e3db Group updates to match real protocol and get better checking 11 years ago
Matt Corallo c90b9a5c59 Some group update verification 11 years ago
Matt Corallo b1ec02fa92 Group API 11 years ago
Matt Corallo d0fd3e94d8 sendMessage refactor, initial group stuff (breaks message storage) 11 years ago
Matt Corallo cf35b7056f Retry API, standardize <script> list 11 years ago
Matt Corallo 8f49d201e6 Fix longstanding(?) attachment bug 11 years ago
Matt Corallo c2d1d816f2 Save sessions in deviceObjects, test using fake_api, minor tweaks 11 years ago
Matt Corallo 1724d122d3 More typos from me being too tired 11 years ago
Matt Corallo aec36468bc Request new keys (largely untested) 11 years ago
Matt Corallo 68131a6e2a Add human readable version of errors 11 years ago
Matt Corallo 753a950816 Redo registration process 11 years ago
Matt Corallo 2d12a33ead Fix decoding/protos/tests 11 years ago
Matt Corallo ac48d552fa Fix some bugs recently introduced 11 years ago
Matt Corallo 21b95ce1d3 Re-create some of d9bf0a4, which was broken and reverted in 1e6720 11 years ago
Matt Corallo 18f1eed70f Some number verification refactor stuff 11 years ago
Matt Corallo d387cd22f5 s/getEncodedNumber// (with XXXs) 11 years ago
Matt Corallo 9aae93fc99 textsecure.protos 11 years ago
Matt Corallo d9bf0a41fb textsecure.storage, chromium.js 11 years ago
Matt Corallo ee2f43aba4 Fix, display (image) attachments 11 years ago
Matt Corallo be82547ea1 Move message saving out of helpers.js 11 years ago
lilia b852e68290 Backbone message storage and views
Adds Backbone-based Whisper.Messages model/collection with local storage
extension. Saves sent and received messages in Whisper.Messages instead
of message map. This will assign a unique id to the message and save it
to localStorage.

Adds Backbone-based view to popup.html
  Automatically updates itself when new messages are saved to
  Whisper.Messages db from the background page.

Added some shiny new styles, and started splitting up css into multiple
files for sanity's sake.
11 years ago
lilia 170257dafb Fix subscribeToPush is not defined 11 years ago
lilia ed3aa9667d Fix undefined URL_BASE in background.js
Sieze an opportunity to move code out of the helpers.js.
Only 616 more lines to go.
11 years ago
Matt Corallo 6bc19ef558 More namespacing 11 years ago
Matt Corallo 05101b69b0 Some initial helpers.js namespaceing 11 years ago
Matt Corallo 07a23f0759 Fix attachments 11 years ago
Matt Corallo 3103eaa192 Commit broken attachment loader (S3 403s I can't figure out...) 11 years ago