1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-06-13 00:41:55 +03:00
Commit Graph

49 Commits

Author SHA1 Message Date
6f7c74f9ea Add syntax & type check for Node.js example on CI (#4410)
* Add syntax & type check for Node.js example on CI

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>

* Fix quotes

---------

Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
Co-authored-by: Florian Duros <florianduros@element.io>
2025-01-03 18:49:57 +00:00
c8403f39aa Fix build failure in node.js example (#4394)
* Fix node.js example

Relates to: element-hq/element-web#26922
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>

* Update examples/node/app.js

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Update examples/node/package.json

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Move imports to the top of the file

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-09-13 15:35:45 +00:00
d90292bff5 Use prebuilt js-sdk for node example (#4286)
This example seems to have been broken by the switch to Typescript. We can't
just symlink in `../..` because that gives us the typescript version of the
source, which, obviously, doesn't work in node.

Instead, make sure we use a prebuilt version of the js-sdk.

It's actually even more broken as of js-sdk 33.0.0, thanks to the switch to ES
modules (#4187), but we'll get to that later.
2024-06-27 16:58:26 +00:00
92342c07ed Introduce Membership TS type (take 2) (#4107)
* Introduce Membership TS type

* Adapt the Membership TS type to be an enum

* Add docstrings for KnownMembership and Membership

* Move Membership types into a separate file, exported from types.ts

---------

Co-authored-by: Stanislav Demydiuk <s.demydiuk@gmail.com>
2024-03-18 12:47:23 +00:00
68317ac836 Remove browserify builds (#3759) 2023-10-03 10:23:11 +01:00
cef5507ab1 Include 'yarn install' . (#3011) 2023-01-03 14:07:37 +00:00
349c2c2587 Apply prettier formatting 2022-12-09 09:38:20 +01:00
224e592701 Fix examples/browser/browserTest.js (#2952)
This seems to have been broken for ages
2022-12-08 10:43:20 +00:00
cde935629d Replace deprecated String.prototype.substr() (#2298)
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-04-14 15:23:27 -06:00
99451698a4 Set a deviceId for VoIP example and use const/let (#2090) 2021-12-23 13:37:55 +00:00
412645f025 Use HTTPS
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
2021-08-30 13:32:30 +01:00
e527c46f34 Add empty favicon
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
2021-08-30 13:32:30 +01:00
da471b57ad Define document encoding
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
2021-08-30 13:32:30 +01:00
a4ff97c8df Add required lang attribute
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
2021-08-30 13:32:30 +01:00
3b7d6f8334 This check doesn't seem to be necessary
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-30 14:43:00 +02:00
4b3c8b2969 Update the example to work with the new feed code
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-30 14:18:20 +02:00
ad80d69369 Add some basic styling
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-30 14:17:30 +02:00
1c9dbbbb19 [BREAKING] Convert RoomState's stored state map to a real map
Though the dictionary format works fine, it's slow. Access times are around the 1ms range for rooms like HQ, which doesn't seem like much, but when compared to the Map's access time of 0.05ms it's slow.

Converting things to a map means we lose index access and have to instead use `.keys()` and `.values()`, both of which return iterables and not arrays. Even doing the `Array.from()` conversion we see times in the 0.05ms range. This is also what makes this a breaking change.

Memory-wise there does not appear to be any measurable impact for a large account.
2020-07-08 22:28:14 -06:00
6aa5d39357 move new example to own directory 2020-01-27 14:28:50 +01:00
1d3a7b3d52 add example for export/import in browser 2020-01-23 16:55:16 +01:00
f952f6742f Remove ancient "use strict" annotations
We don't need these anymore. Theoretically this commit could go to develop, but for safety it's going to `travis/sourcemaps` first.
2019-12-17 15:43:02 -07:00
4a47867e49 Down to two test failures 2019-12-04 19:17:58 +00:00
f55a2079bf replace getMember(myId).membership with getMyMembership
This works with rooms which haven't had their members
loaded yet.
2018-08-15 12:00:38 +02:00
42c3cf2545 Use correct variable name
From https://github.com/matrix-org/matrix-js-sdk/pull/401
2017-04-06 16:09:28 +01:00
a5f0ec7c7d Fix examples. 2016-11-12 17:39:48 +01:00
be1264d5c3 Update README.md 2015-07-15 09:47:25 +01:00
e3fdcaaff5 Add noddy voip example app. 2015-07-14 17:11:30 +01:00
34086f48fa Separate impl for node and extend example node app to use it. 2015-07-08 16:13:10 +01:00
62d7ff5ba9 Add colours to terminal. Sort room list by TS. 2015-06-23 17:46:52 +01:00
07d3f43d8b Refactor terminal app; add /invite and /roominfo. 2015-06-23 15:22:57 +01:00
57914969b8 Add MatrixClient.resendEvent to manually resend an event that was not sent.
Bundle txnId as MatrixEvent._txnId instead of exposing it to every place that
happens to need it (since it's so tightly coupled with MatrixEvent)
2015-06-23 14:08:02 +01:00
7534f59af2 Hook up the callback fn for scrollback. Update CHANGELOG. 2015-06-23 12:04:43 +01:00
553325d66f Improve UX on node terminal app.
Add auto-complete, history and a prompt prefix.
2015-06-23 11:50:17 +01:00
6737388766 Implement pagination via the scrollback() function. Update CHANGELOG. 2015-06-23 11:36:30 +01:00
ef77c6f989 Sync room state when another device joins a room. 2015-06-23 10:18:13 +01:00
bc0e2ad504 Sync room state when joining via client.joinRoom
Does not currently sync state when another device joins.
Update node example app to refresh room list.
2015-06-22 17:50:49 +01:00
d151ac49f2 Mark events which fail to send. 2015-06-18 09:32:04 +01:00
8e6eb35dfe Implement local echo.
Mark events being sent via the status property. Update CHANGELOG.
2015-06-17 17:42:12 +01:00
3dc6bf3647 Update README with example output 2015-06-12 16:33:04 +01:00
7a96637a1b Example app: Print timestamps and all state events. 2015-06-12 16:26:44 +01:00
71dacb14b1 Add MatrixEvent.sender and .target to pull the right name per message. 2015-06-12 11:05:57 +01:00
da7b31cb7e Add Room.getJoinedMembers helper. UX tweaks to example. 2015-06-12 10:49:13 +01:00
8c5c7cc961 Make examples/node/app an actual app rather than the usage example. 2015-06-12 10:33:45 +01:00
65453f8359 Update browser readme; ignore jsdoc/coverage folders. 2015-06-08 10:43:00 +01:00
da531a95b8 Also remove request dep on examples/node, since the 'matrix-js-sdk' import automatically pulls in the 'request' module. 2015-06-03 16:25:19 +01:00
bd202b3193 Remove browser-request dep from examples/browser.
We no longer need this because the dist/ package includes a copy already. This
simplifies browser development a lot.
2015-06-03 16:22:04 +01:00
9b4ba0afe8 Redo build process for browsers and node. Update examples.
We now rely on browserify for building browser-specific versions of the JS
SDK. This can be initiated by running 'npm run build-js'. Node versions are
unaffected.
2015-06-03 15:51:48 +01:00
18a684e0be Add tiny promise wrapper. 2015-03-04 20:38:29 +00:00
39fed87bb4 Add examples to show it working in node and browser 2015-03-04 17:24:20 +00:00