~taiite/public-inbox

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2 2

[PATCH senpai] Use line.Head for notifyHighlight

Details
Message ID
<20210529071836.6067-1-yyp@disroot.org>
DKIM signature
pass
Download raw message
Patch: +1 -1
Prior to this, /me messages on highlight had duplicate information about
the sender, like this:

    <dude> dude did something to yyp

Now such messages are displayed with "*" as the sender, which also
allows to distinguish them from regular messages.
---
 app.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app.go b/app.go
index d3a6049..bd47762 100644
--- a/app.go
+++ b/app.go
@@ -585,7 +585,7 @@ func (app *App) handleIRCEvent(ev interface{}) {
		buffer, line, hlNotification := app.formatMessage(ev)
		app.win.AddLine(buffer, hlNotification, line)
		if hlNotification {
			app.notifyHighlight(buffer, ev.User, line.Body.String())
			app.notifyHighlight(buffer, line.Head, line.Body.String())
		}
		if !app.s.IsChannel(msg.Params[0]) && !app.s.IsMe(ev.User) {
			app.lastQuery = msg.Prefix.Name
-- 
2.31.1
Details
Message ID
<20210529110821.473b89dc@vroom.localdomain>
In-Reply-To
<20210529071836.6067-1-yyp@disroot.org> (view parent)
DKIM signature
pass
Download raw message
You can use "${MESSAGE#$SENDER*}" to strip any occurrence of $SENDER at
the beginning of the message.

Mind that on-highlight can be used for more than sending notifications!
It's better to let $SENDER be the real sender of the message.
Details
Message ID
<CBPQTX7MK48F.133ZUPJQ6RZ6S@desktop>
In-Reply-To
<20210529110821.473b89dc@vroom.localdomain> (view parent)
DKIM signature
pass
Download raw message
On Sat May 29, 2021 at 12:08 PM MSK, Hubert Hirtz wrote:
> You can use "${MESSAGE#$SENDER*}" to strip any occurrence of $SENDER at
> the beginning of the message.
>
> Mind that on-highlight can be used for more than sending notifications!
> It's better to let $SENDER be the real sender of the message.

Fair enough. I'm ok with current behaviour.
Reply to thread Export thread (mbox)