11 Commits
Author SHA1 Message Date
pajladaandGitHub 3b7aa53d1d plugins: include exhaustiveFlags in clone (#7195)
Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl>
Reviewed-by: Nerixyz <nerixdev@outlook.de>
Parent-pr: 7192
2026-08-23 12:51:12 +00:00
pajladaandGitHub 036f2c154a messageelement: allow for exhaustive flag test (#7192)
this allows most elements to be configured with the "exhaustiveFlags"
flag which ensures that _all_ of the element's flags must be set in the
context for it to be laid out.
2026-08-23 10:55:10 +00:00
b_drinkandGitHub 58f9ff32a2 fix(plugins): Message:append_element(MessageElement) unreachable (#7176)
When passing a `MessageElement` instead of an init table to
`Message:append_element` in a lua plugin, it would error with "Invalid
message type" suggesting that it calls `elementFromTable`, i.e. acts as
if a `MessageElementInit` table was passed.

```

Reviewed-by: Nerixyz <nerixdev@outlook.de>
Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
2026-08-15 23:06:33 +00:00
NerixyzandGitHub ea0e913af4 feat(plugins): Allow messages to be cloned (#6990)
After #6909, we can clone message elements. With this PR, we can clone
whole messages. The messages are non-frozen afterward, so plugins can
edit their properties and add/remove elements.

Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
2026-08-09 11:56:06 +00:00
491cda1a58 feat(plugins/datetime): Add local/UTC conversion (#7122)
I mentioned in #7096 that it's helpful to convert between UTC and local
timezones. This PR adds methods for this.


Co-authored-by: Mm2PL <mm2pl+gh@kotmisia.pl>
Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl>
Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
Parent-pr: https://github.com/Chatterino/chatterino2/pull/7096
2026-08-05 18:47:31 +00:00
NerixyzandGitHub d853137820 feat(plugins): Add c2.DateTime (#7096)
This adds the `DateTime` API described in #7021.

Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl>
Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
2026-07-19 13:26:21 +00:00
NerixyzandGitHub a582c1efc3 plugins: add message signals (#6781)
This PR adds `Channel:on_message{_appended, _replaced, s_cleared}`. They
use the same functionality as the display name changed signal and
forward the respective signals in `Channel`.

**They're all synchronous.** This makes the implementation fairly
straight forward, but also a trivial stack overflow. Other than
Chatterino crashing, this shouldn't have any consequences, because the
OS will kill the process. Note that a plugin can already halt Chatterino
by executing an infinite loop, because plugins run in the GUI thread.

Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl>
Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
2026-04-05 11:02:17 +00:00
NerixyzandGitHub cbf7893a8e feat(plugins): Add images and image sets (#6792)
You can query them and on sets, you can change the images. Note that
sets are value types, so getting an image set in Lua will always refer
to a copy, not a reference.

Images are special, because plugin authors can specify a URL that
Chatterino will load if the image is shown. While the plugin can't see
the response, it still causes Chatterino to issue a request, so
_creating_ images will require the network permission.

Tested-by: Mm2PL <mm2pl+gh@kotmisia.pl>
Tested-by: pajlada <rasmus.karlsson@pajlada.com>
Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl>
Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
2026-04-04 23:37:40 +00:00
NerixyzandGitHub d21b3c6e38 feat(plugins): Added message read/update methods to the Channel API. (#6650)
This PR adds methods to read and update messages in a channel. Specifically, it adds:
 - message_snapshot
 - last_message
 - replace_message/replace_message_at
 - clear_messages
 - find_message_by_id
 - has_messages
 - count_messages


Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl>
2026-01-20 23:46:39 +00:00
nerixandGitHub 74b4674c6b feat(plugins): allow message introspection (#6353)
This allows users to introspect messages (i.e. look at the elements they're made up of).

Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl>
2025-12-07 14:52:59 +00:00
nerixandGitHub b63739e792 feat(plugins): add JSON parsing/serialization (#6420)
Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl>
Reviewed-by: pajlada <rasmus.karlsson@pajlada.com>
2025-11-21 17:43:28 +01:00