~reedwade/wee-matter-devel

What's new in my clone

~midgard
Details
Message ID
<160570723430.28229.14412118992131708753@localhost>
DKIM signature
missing
Download raw message
I've been working on some things in my clone. Because these changes weren't developed in a nice
atomic way like I present them below, preparing nice patches would be a bit of work. So let me know
what you're interested in so I can prepare patches for only the stuff you like. To see the code for
features, it shouldn't be hard to find it on the master branch in my clone at
https://git.sr.ht/~midgard/wee-matter.

---------

Further notify level tweaks

Messages like joins, parts and topic changes should have default notify level.
Quote and edited headers should get notify_none and no_highlight.

---------

More mention words

@channel and @all are also used to mention everyone. In the webinterface, @here is for all people
that are currently online, while @channel and @all will additionally send out email and mobile
notifications for people who aren't. Wee-matter need not make such a distinction.

---------

Bidirectional "channel read" synchronisation

We already push "channel read" to the server; I also implemented the other way: reading in the
webclient removes a channel from the hotlist.

There's still a minor issue with the unread line: because I now receive my own channel read event
back from the server, the unread line is reset to the bottom immediately after switching to a
buffer. I hope to fix that soon.

---------

Support for incoming /me actions

Before:

	person | Hey, watch me do something!
	person | is doing something

After:

	person | Hey, watch me do something!
	     * | person is doing something

---------

Support for nick_prefix and suffix config

In my WeeChat config it looks like this:

	<person> Hello there
	       * person is doing something

I'd like to work on adding support for the styles of joins/parts and topic changes too in the
next few days.

---------

Clear and hydrate buffer when switching

As you know, I hydrate when switching to a buffer that's not yet hydrated. But I also accept new
messages (from the websocket) for buffers that aren't hydrated yet. So when hydration is complete,
I clear the buffer before writing the backlog. This avoids duplicate messages.

I expect that this will still work with your queued hydration in the background.

---------

Unify write_message_lines

Writing a message to the buffer was getting a bit too involved to have it copied for edits and
replies. I changed `write_reply_message_lines` into `write_reply_header` (and likewise for
`edited`) and made `write_post` call them in the correct order, it's quite simple actually:

	if is_reply:
	    write_reply_header(buffer, post)
	if is_edited:
	    write_edited_header(buffer, post)
	
	if is_deleted:
	    write_deleted_message_lines(buffer, post)
	else:
	    write_message_lines(buffer, post)
	    wee_matter.file.write_file_lines(buffer, post)

---------

"Edited post" detection for older posts

I made "edited post" detection not rely on "does this exist in the buffer" but instead the
websocket handler passes this information to `write_post`. Now edits for older posts don't appear
like new messages.

---------

Visual overhaul for quotes

Before:

	person1 | hello
	person1 | hello (green)
	person2 | hi
	person1 | hello (green)
	person2 | how are you?
	person3 | hmm, i have a problem
	person2 | hi (yellow)
	person2 | hi!
	person1 | hello (green)
	person1 | great! you?

After:

	person1 | hello
	person2 |  ↳ hi
	person2 |  ↳ how are you?
	person3 | hmm, i have a problem
	person1 | hello (both message and prefix grey italic)
	person2 |  ↳ hi (yellow)
	person2 |  ↳ hi!
	person1 |  ↳ great! you?

I made sure this works together really nice with edits/deletions and /me too. Because
of the write_message_lines unification this was not hard and doesn't add much complexity.
Reply to thread Export thread (mbox)