Commit graph

361 commits

Author SHA1 Message Date
Adam Porter
63269197ee Change: (ement-room-transient) Show favourite/low-priority status 2022-05-08 11:09:26 -05:00
Adam Porter
4504530042 Fix: (ement-room-occur) Timestamp headers 2022-05-08 11:01:13 -05:00
Adam Porter
1aa0530739 Tidy: (ement-room-transient) Grouping 2022-05-08 10:57:26 -05:00
Adam Porter
bff54e009b Add: (ement-room-set-composition-format)
Thanks to @treed for suggesting.
2022-05-08 10:51:51 -05:00
Adam Porter
ee26204197 Change: (ement-room-transient) Group name 2022-05-08 10:51:37 -05:00
Adam Porter
8d713ce4c1 Add: Format m.room.power_levels events 2022-05-08 10:31:59 -05:00
Adam Porter
c7928d399f Fix: (ement-room--format-body-mentions) Regexp
Thanks to @benoitj:matrix.org for reporting.
2022-05-08 09:09:27 -05:00
Adam Porter
4b94c46c5c Change: Rename ement-invite to ement-invite-user 2022-05-07 09:44:16 -05:00
Adam Porter
9b3756c796 Add/Change: Sync bindings with Transient menu, update readme 2022-05-07 09:44:16 -05:00
Adam Porter
078d9db4ef Fix: (ement-room--format-membership-events) Typo 2022-05-07 07:36:17 -05:00
Adam Porter
9f72b9bf2a Add: (ement-room-transient) More bindings 2022-05-07 07:36:00 -05:00
Adam Porter
e0247f0d92 Add: (ement-room-transient) 2022-05-06 20:46:27 -05:00
Simon Pugnet
37f16ec1de Fix: Calls to ement-room-send-message-filter
The new ROOM argument was omitted in ement-room-send-emote and
ement-room-edit-message.

Reported-by: Simon Pugnet <simon@polaris64.net>
Modified-by: Adam Porter <adam@alphapapa.net>
2022-05-06 19:26:31 -05:00
Adam Porter
58c30e8508 Change: (ement-room--format-reactions) Highlight locally sent reactions 2022-05-05 17:48:20 -05:00
Adam Porter
0a3869c021 Change: (ement-room-defevent) Instrument with Edebug
Very handy, as usual.
2022-05-05 16:54:29 -05:00
Adam Porter
f1a291a15e Add: (ement-room--format-reactions) Show reaction name in help-echo 2022-05-05 16:54:11 -05:00
Adam Porter
e99baffacb Change/Fix: Formatting of redacted messages 2022-05-05 16:53:58 -05:00
Adam Porter
84b61941df Add: (ement-room-toggle-reaction) 2022-05-05 16:52:08 -05:00
Adam Porter
6f4ef97176 Add: (defface ement-room-redacted)
And use in ement-room--event-body-face.
2022-05-05 16:51:08 -05:00
Adam Porter
a4dcda4df2 Add: (ement-room-defevent "m.room-reaction") 2022-05-05 16:50:35 -05:00
Adam Porter
e0004b9202 Add: (ement-redact)
And use in ement-room-delete-emssage.
2022-05-05 16:49:54 -05:00
Adam Porter
84739451af Tidy: Disable expansion of debug forms by default 2022-05-05 13:57:48 -05:00
Adam Porter
28f9697258 Add: Coalesce membership events
This also lays some foundation for coalescing other event types in the
future (maybe even grouping by sender, which might replace the awkward
code for inserting sender headers for the "Elemental" message format;
but that would need to be done very carefully, because events can
arrive out of order, which might require splitting coalesced events at
times).
2022-05-05 13:28:15 -05:00
Adam Porter
469b2ae3b4 Add: (ement-room-wrap-prefix)
Applied to image messages, and in the next commit, to membership
events.
2022-05-05 12:36:15 -05:00
Adam Porter
dd17b6feec Fix: (ement-room-mark-read) Marking latest event
The last event in a room's timeline may not always be the last event
displayed in the room's buffer (e.g. a reaction to an earlier event).
So when intending to mark all events in the room as read (when point
is after the last displayed event), mark the latest event as read
rather than the last displayed event.  (Otherwise, the room would not
get fully marked as read, and could display as an unread room.)
2022-05-05 08:08:10 -05:00
Adam Porter
77a2593e73 Fix: (ement-room--format-message-body) Message types 2022-05-02 09:16:16 -05:00
Adam Porter
df431f5cad Tidy: Indentation 2022-05-02 06:40:08 -05:00
Adam Porter
a441c1f85a Tidy: Remove unused declare-function 2022-05-02 06:40:08 -05:00
Adam Porter
b00fb58673 Change: (ement-room--format-m.image) Relief, margin, pointer
This looks a bit nicer, and it conveys that the image is clickable.
2022-05-02 06:40:08 -05:00
Adam Porter
be5d68cd2c Add/Change: (ement-room-send-file)
Also, move most logic from ement-room-send-image to it.
2022-05-02 06:40:08 -05:00
Adam Porter
6dc47f683c Add: Format m.file events 2022-05-02 06:37:08 -05:00
Adam Porter
478091be38 Add: (ement-room--format-m.image) Linkify image URLs
When not showing images (when ement-room-images is nil), linkify the
URL to the image.

Thanks to @Wibjarm:matrix.org for reporting.
2022-05-02 06:36:54 -05:00
Adam Porter
c827e96d62 Fix: (room-defevent "m.room.message") Replaced messages
When reopening closed room buffers that contain retro-loaded messages
that include events that have been replaced by later edits, the
original messages were inserted alongside the edits, because the edit
events were inserted before the original events, so the original
events were not replaced by the edits.

This happened because the edits were processed before the originals,
because the events were stored out-of-order in the timeline.  Now,
this shouldn't have been the case, because when retro-loading
messages, we store them at the beginning of the timeline, before the
newer events.  But, for some reason, this isn't always working.  The
Matrix spec says that the definition of "chronological order" is
up to the server, so maybe it's not always returning them in the order
we would expect.

So this is a mildly hacky workaround: if the event's unsigned data
indicates it's been replaced, we just don't insert it.  Theoretically,
we should already have any such replacing event.

If we wanted to be extra careful, we could look up the replacing event
in the hash table to ensure we've got it, but we can add that later if
necessary; for now, let's not.
2022-05-02 04:54:12 -05:00
Adam Porter
8651e480ee Tidy: Declare function 2022-05-02 04:01:38 -05:00
Adam Porter
7e9eb20980 Fix: (ement-room-mode-map) ement-room-occur binding 2022-05-02 04:01:13 -05:00
Adam Porter
fcf9ad92b4 Add: (ement-room-occur) et al. 2022-04-29 16:04:27 -05:00
Adam Porter
1a6b77ec51 Fix: (ement-room-find-event) Use event ID
For some reason, e.g. membership events in the EWOC are not always
`eq', so just compare IDs.
2022-04-29 15:58:16 -05:00
Adam Porter
a16db0ce6b Tidy: (ement-room-retro-to) Declare indentation 2022-04-29 14:34:15 -05:00
Adam Porter
7a6390537f Add: Go to events in matrix.to URLs when possible 2022-04-29 14:33:31 -05:00
Adam Porter
80ae7dc83e Tidy: Docstrings 2022-04-29 13:45:03 -05:00
Adam Porter
7f118498f4 Fix: Compilation warning 2022-04-29 13:38:26 -05:00
Adam Porter
255ffbf052 Change/Fix: (ement-room--insert-event) Refactor and fix name headers
Ideally we would just call ement-room--insert-sender-headers for the
proper nodes, but at the moment this seems to work properly, so let's
just use this.  We can refactor this into that again later.
2022-04-28 08:03:28 -05:00
Adam Porter
e047677fa0 Change/Fix: (ement-room--insert-sender-headers) Refactor and fix
Now works with read markers, is clearer, etc.
2022-04-28 07:20:16 -05:00
Adam Porter
a929af9fa3 Fix: (ement-room-set-message-format) Set margins in buffer
Not just with set-window-margins.
2022-04-28 05:56:07 -05:00
Adam Porter
d9fef46f1b Fix: (ement-room--insert-event) Elemental-style message format 2022-04-27 11:52:42 -05:00
Adam Porter
5bddd9282e Add/Fix: (ement--xml-escape-string, ement-room--format-body-mentions)
Escape non-XML(/HTML?) characters in HTML-formatted mentions.
2022-04-27 11:31:55 -05:00
Adam Porter
d4020544f1 Add: Linkify mentions in outgoing messages 2022-04-26 08:08:30 -05:00
Adam Porter
01d6bd612a Tidy: (ement-room-leave) 2022-04-26 07:56:42 -05:00
Adam Porter
aebf61de4a Fix: (ement-room-goto-prev) When at point-max 2022-04-26 07:49:03 -05:00
Adam Porter
e54ad99b38 Add: (ement-room-warn-for-already-seen-messages) 2022-04-22 11:13:10 -05:00