Skip to content

Releases: Skylar-Tech/node-red-contrib-matrix-chat

v0.8.0

04 Sep 03:26
5de1274
Compare
Choose a tag to compare

This is a big release. Added a bunch of new nodes and even modified existing nodes to return more information. We are also deprecating the Send Image and Send file nodes in favor of the new Upload File node.

Deprecation

The Send Image and Send File nodes are being deprecated and will be removed in a future release. Instead use the Upload File node and chain with a Send Message node to get the same behavior (the Send Message node was updated so if you pass an object in as the payload it will override the whole message object and so the Upload File node returns an already formatted payload object to allow direct chaining).

New Nodes

  • New Send Typing node for sending typing events #100
    • useful if you want to show the bot is processing a request (such as doing a chatGPT or other API call)
  • New Room State Events node for setting/getting room state events #97
    • Can set room name, topic, avatar, and custom state events
    • Can get name, topic, avatar, encrypted, power_levels, aliases, guest_access, join_rule, join_allow_rules, and custom events.
  • New Upload File node #102
    • This was added so you can upload a file without sending a message so you can for example upload an image to set a new room or user avatar.
    • Supports file encryption
    • This node will auto detect file information for m.video, m.audio, and m.image files (resolution, duration, etc)
    • Has option to generate thumbnail for m.video and m.image files
    • Can be chained directly to a send message node to send the file to a room
  • New User Settings node for getting or setting current user's avatar or display name #105
  • New Get User node for fetching information about a userId (display name, avatar URL, if they are currently active, when they were last active, etc)
    • Testing shows that the bot user must be sharing a room with the user you are querying information for
  • New Paginate Room node for fetching room history #28

All Changes

  • Make errors catchable (fixes #85) - Thanks bvmensvoort!
  • Reduce margin between checkboxes for matrix-receive node config
  • matrix-send-message node can now be used to reply in a thread (closes #104)
  • matrix-receive-node output changes
    • added msg.mentions to output for easier access to who was mentioned in message
    • added boolean msg.isThread to output based on whether the message is a thread reply or not
    • added msg.user to output for getting full user information object (contains their display name, avatar URL, when they were last active, etc)
  • New Send Typing node for sending typing events #100
  • New Room State Events node for setting/getting room state events #97
  • Updated Leave Room node so it deletes the room from local storage
  • Updated server config node so it deletes the matrix client from context storage during shutdown
  • Added new node for file uploading #102
  • Send message node now accepts an object to override the full message content
    • This allows you to fully customize the message object
    • This was a necessary change so you can now connect an Upload File node with a Send Message node
  • New User Settings node for getting or setting current user's avatar or display name #105
  • Rooms provided in Room ID config under receive node now trims results to prevent mistakes
  • Fixed Received images missing thumbnail kills Node Red #65
  • Stop using deprecated login object #114 - Thanks squatica!

v0.7.1

05 Sep 17:27
8a7fba3
Compare
Choose a tag to compare
  • Upgrade matrix-js-sdk from 22.0.0 to 28.0.0
  • Upgrade olm from v3.2.13 to v3.2.15

v0.7.0

07 Dec 05:16
78f8ab7
Compare
Choose a tag to compare

New Features

  • new node "Invite Room" for receiving room invites @jacotec #71
  • new node "Leave Room" for leaving a room

Enhancements

  • Existing "Invite Room" node was for sending invites and has been re-named to "Invite to Room" to distinguish between it and the new node.
  • updated examples with new nodes
  • console messages now only appear if Node-RED's settings.js logging.console.level is info, debug, or trace

Fixes

  • Verify login on the relative matrix-chat/login URI @WesleyE #73
  • added node-fetch polyfill for older nodejs versions
  • added abort-controller polyfill for older nodejs versions

Dependency Updates

0.6.1

19 Apr 19:05
4c17a21
Compare
Choose a tag to compare
  • Can now receive audio files. Closes #61
  • Can now receive locations
  • Readme updated
  • Fixed error in folder migration from old to new path if they were the same directory

0.5.8

18 Mar 19:52
00bc14e
Compare
Choose a tag to compare

Message can now be deleted and modified! Thanks to @aikitori for adding the Delete Event node.

New features:

  • New Delete Event node added by @aikitori Closes #52
  • New option for Send Message node that allows replacing existing message if enabled and msg.eventId is passed in. So now messages can be modified! Closes #54

Enhancements:

  • matrix-receive now outputs msg.isDM to determine if the message was a direct message or not. Closes #29
  • can now specify message in node's configuration for matrix-send-message. #56
  • can now specify reaction in node's configuration for matrix-react. #56
  • reason can now be configured on both matrix-room-kick and matrix-room-ban. #56
  • roomId input is now validated to ensure it starts with ! and if not shows an error for invalid room ID. Closes #50

Other Changes:

  • e2ee wouldn't start up correctly unless a device_id was defined in configuration (and therefor auto detecting device_id was broken). This is fixed.
  • On startup we now do a call to /whois to figure out if our auth token is valid and belongs to the user that was specified. This also gives us the device_id for the auth token therefore making the device_id automatically detected. Note this only works on Synapse version 1.40.0 onwards. If your server runs a version before that you will need to manually specify the device_id.
  • matrix-js-sdk update from 15.5.0 to 16.0.0
  • Fixed some breaking changes in new matrix-js-sdk version
  • various nodes had their configuration icons modified/fixed
  • Updated various dependencies to latest version

0.4.6

09 Feb 20:04
Compare
Choose a tag to compare

Another release! There are no breaking changes so you should be good to update (make sure to backup your directory if using encryption just-in-case).

Node-RED Scorecard

Node-RED added a scorecard to packages on their website. This lets you check the quality of a package. We had 7 success and 5 warnings. You can view the scorecard for this package here: https://flows.nodered.org/node/node-red-contrib-matrix-chat/scorecard

To increase our success on the scorecard we did these things this release:

  • This package now requires Node-RED version 1.3.0 or greater (we only support Node-RED versions that are still being maintained or developed)
  • This package now requires NodeJS 14 or newer. The got library update pushed us on this one.
  • Every node now has an example

Fixes

  • Currently the package stores client information in the Node-RED directory but this is wrong. We now store in Node-RED's user directory. I thought that these were the same thing but they are not. Fixes #37
  • send-image node fixed so error doesn't get thrown (matrix-js-sdk updated causing some errors) Fixes #42
  • If a matrix server configuration node was missing it's User ID it would throw a TypeError instead of telling the user the actual issue.
  • Remove mention of Device ID being required for encryption (since it can now auto generate if not provided this could make people think they have to set it when that isn't the case)
  • matrix-js-sdk updated from ^v15.3.0 to ^v15.5.0
  • got updated from ^11.8.2 to ^12.0.1 (this also required us to change how we import this library in code)
  • Node-RED version requirement added for >=v1.3.0
  • NodeJS version requirement added for >=v14.0.0
  • removed process dependency

Other Changes

  • Receive node now outputs msg.filename for files and images (so you don't have to interpret this yourself)
  • Removed message in the room-users config stating it only works if you are an admin

Examples

We have a few new examples:

  • Creating a room and inviting a user
  • Joining a mentioned room
  • Listing out a user's or server's rooms
  • Getting session data from a user via whois info
  • Getting a room's user list
  • Downloading & storing received files/images
  • Kicking/banning user from a room.
  • Deactivating a user
  • Force joining a user to a room

The following example was updated to support pagination:

  • Updated user list example: it now paginates all users on the server (if you had a lot of users the message would fail to send because it was too large)

0.4.1

03 Feb 18:35
Compare
Choose a tag to compare

Upgrading in Node-RED is broken due to testing a new olm library version. This reverts that change. No other changes since 0.4.0.

0.4.0

03 Feb 17:37
Compare
Choose a tag to compare

Got a few bug fixes and a new feature.

Device ID changes:
We changed how the Device ID is handled. The documentation was wrong in saying that you can manually set one. This is not the case and it must be generated by the server. If you use shared secret registration the server will provide you with a device_id that you can use. If you do not have one leave this blank and it will be automatically generated and stored internally (the field when editing the server config will always show blank in this case). If you provide a Device ID it will over-write the internally stored one. If you need to clear the Device ID (such as to reset E2E) you need to delete the matrix-client-storage/<your_user_id>/my_device_id file to reset this (and also make sure your server config's Device ID is blank).

If you left the Device ID blank previously it would generate a new one every time the client started. This would cause encryption to break as your keys are attached to your Device ID. We now store this internally so we can use the same device every time the client reconnects. This means the Device ID is no longer required and all you need to provide is the access token.

Fixes:

  • Device ID fix mentioned above
  • matrix-join-room node was requiring msg.userId when it didn't need it. Closes #39
  • Example readme linking to wrong json file. Closes #38
  • Reactions were not working due to sendCompleteEvent being a private method. Closes #41
  • If invalid auth token is used we now validate it before starting the client. This will prevent Node-RED from crashing.

New feature:

  • You can now get an access token and device ID from just a user id and password. When you are setting up a matrix server connection node fill in these details and click "Update Access Token" and it will auto fill this in for you. This should make setting up on a server you are not an administrator quite a bit easier. Note: Your password is never stored and is only used for fetching an access token and device ID.

0.3.0

14 Jan 19:58
Compare
Choose a tag to compare

There are a few fixes in this release:

  • Messages used to get ignored if they were over 1 second old. This caused issues with messages being ignored on servers that took longer than a second to respond (cough matrix.org cough). Now it accepts all new messages. Moving forward any messages that are sent before Node-RED starts or gets deployed will be ignored (so that old messages don't pop up since the cache clears every deploy/node-red restart so old messages look like new ones).
  • When the matrix-server node would shut down (from a deployment) it wasn't properly shutting the old instance of the client down. This would cause messages to start duplicating X times (X being however many times you deployed since you last started Node-RED). This is now fixed.
  • Upgraded to matrix-js-sdk 15.3.0
  • Message processing is now done on the matrix-server node. Before if you had multiple matrix-receive nodes it would output one line per matrix-receive node into the log. Now it only outputs from the matrix-server node. Note that all messages get logged that are sent to rooms the bot is in whereas before it would only log message in rooms the matrix-receive node was configured for.
  • Fixed Shared secret registration failing if user_type was defined.

0.2.7

19 Dec 07:36
Compare
Choose a tag to compare
  • Fix eventId not being returned from matrix-send-file and matrix-send-message nodes

No breaking changes this release.