This repository has been archived by the owner on Mar 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alphapapa
force-pushed
the
ordered-buffer
branch
4 times, most recently
from
October 15, 2018 03:26
4ca3450
to
29f756c
Compare
alphapapa
force-pushed
the
ordered-buffer
branch
2 times, most recently
from
October 16, 2018 01:40
370bcc9
to
81bb5c5
Compare
This may not be the best way to do this. It is simple, and should be fast enough, but there might be a cleaner way to handle this.
Probably need to refactor a bit, or add some functionality to ordered-buffer to cleanly handle inserting from both ends. But this isn't bad. The only issue now is that, when inserting old messages, a new timestamp header is always inserted, even if the timestamp difference is within the delta setting, which is not necessarily a bad thing, because it makes it easier to see where the newly fetched messages are. It gets a little complicated because, when inserting old messages, if we insert from the top (which makes sense), we need to insert the messages in a different order so the prefix-fn looks at the right event to determine whether to insert a new header.
alphapapa
force-pushed
the
ordered-buffer
branch
from
October 16, 2018 02:03
81bb5c5
to
cdbf9e1
Compare
alphapapa
force-pushed
the
ordered-buffer
branch
from
October 16, 2018 02:42
3159197
to
28839f0
Compare
Since some clients include newlines between and before and after the HTML tags, we need a more flexible solution, and esxml is that, thankfully.
See element-hq/element-ios#2080 Not fully tested yet, so feel free to revert.
The client-ng stuff is way past the point of doing a thorough review, and it works pretty well, so I'd recommend just going for it! I've just pushed a |
alphapapa
commented
Oct 17, 2018
@@ -235,7 +235,7 @@ If HTML is non-nil, treat input as HTML." | |||
input (concat "> <" sender "> " quoted-body "\n\n" input) | |||
extra-content (a-list 'format format | |||
'formatted_body formatted-body | |||
'm.relates_to (list 'm.in_reply_to (a-list 'event_id event-id)))))) | |||
'm.relates_to (a-list 'm.in_reply_to (a-list 'event_id event-id)))))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was afraid I wasn't doing that right, because I wasn't sure of how the JSON structure mapped to the lists here. Thanks for fixing this while I was AFK. :)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think this is simpler and more generalized than the old code. Seems to be working well. When you approve, I'll squash and merge.
I think after merging this into
client-ng
we should probably go ahead and mergeclient-ng
intomaster
. What do you think?