diff --git a/package.json b/package.json index 62b1f13429..0ad3c33bca 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "matrix-js-sdk": "matrix-org/matrix-js-sdk#develop", "matrix-react-sdk": "matrix-org/matrix-react-sdk#develop", "modernizr": "^3.1.0", + "pako": "^1.0.5", "q": "^1.4.1", "react": "^15.4.0", "react-dnd": "^2.1.4", diff --git a/src/vector/submit-rageshake.js b/src/vector/submit-rageshake.js index 6ed49a1f5e..ef6fbabe29 100644 --- a/src/vector/submit-rageshake.js +++ b/src/vector/submit-rageshake.js @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +import pako from 'pako'; import q from "q"; import PlatformPeg from 'matrix-react-sdk/lib/PlatformPeg'; @@ -78,7 +79,10 @@ export default async function sendBugReport(bugReportEndpoint, opts) { // encode as UTF-8 const buf = new TextEncoder().encode(entry.lines); - body.append('log', new Blob([buf]), entry.id); + // compress + const compressed = pako.gzip(buf); + + body.append('compressed-log', new Blob([compressed]), entry.id); } }