Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
41db49ff
Commit
41db49ff
authored
May 20, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial code for handling a bundle update via PEP
udpates #497
parent
839210f8
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
105 additions
and
49 deletions
+105
-49
src/converse-omemo.js
src/converse-omemo.js
+95
-47
src/utils/core.js
src/utils/core.js
+10
-2
No files found.
src/converse-omemo.js
View file @
41db49ff
This diff is collapsed.
Click to expand it.
src/utils/core.js
View file @
41db49ff
...
...
@@ -835,15 +835,23 @@
return
result
;
};
u
.
arrayBuffer
2
String
=
function
(
ab
)
{
u
.
arrayBuffer
To
String
=
function
(
ab
)
{
var
enc
=
new
TextDecoder
(
"
utf-8
"
);
return
enc
.
decode
(
new
Uint8Array
(
ab
));
};
u
.
arrayBuffer
2
Base64
=
function
(
ab
)
{
u
.
arrayBuffer
To
Base64
=
function
(
ab
)
{
return
btoa
(
new
Uint8Array
(
ab
)
.
reduce
((
data
,
byte
)
=>
data
+
String
.
fromCharCode
(
byte
),
''
));
};
u
.
base64ToArrayBuffer
=
function
(
b64
)
{
const
binary_string
=
window
.
atob
(
b64
),
len
=
binary_string
.
length
,
bytes
=
new
Uint8Array
(
len
);
_
.
forEach
(
_
.
range
(
0
,
len
),
(
i
)
=>
bytes
.
push
(
binary_string
.
charCodeAt
(
i
)));
// eslint-disable-line lodash/prefer-map
return
bytes
.
buffer
;
};
return
u
;
}));
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment