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
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
349c2c2587
Apply prettier formatting
2022-12-09 09:38:20 +01: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
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
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
a5f0ec7c7d
Fix examples.
2016-11-12 17:39:48 +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
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
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
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
39fed87bb4
Add examples to show it working in node and browser
2015-03-04 17:24:20 +00:00