~delthas/senpai#104: 
Private buffers open/closed status should be tracked among clients

One user, vigoux, said that his private buffers do not get reopened on startup (namely one dating from the day before). Investigate.

Status
REPORTED
Submitter
~delthas
Assigned to
No-one
Submitted
2 years ago
Updated
6 months ago
Labels
blocked enhancement

~the-y 2 years ago

Looked a bit into it, it seems like senpai does things correctly and send a CHATHISTORY TARGETS timespan=.. timespan=.. 1000 at the beginning (https://ircv3.net/specs/extensions/chathistory#targets). The problem seems to be, that in my case, ergo.chat is not mentioning PRIVMSGS unless there are unread messages. Not sure if this is a problem of the spec or ergo.chat.

~the-y 2 years ago

I could work around this a bit by changing the line in app.go that retrieves targets since the client disconnected the last time to retrieving target since one week before we last logged out.

		s.NewHistoryRequest("").
			WithLimit(1000).
			Targets(app.lastCloseTime.Add(-time.Hour*24*7), msg.TimeOrNow())

The problem is now, that the irc server doesn't know if we parted a privmsg buffer or not, it's a complete client side thing and those privmsg buffers will get reopened each time one starts senpai (until the last message in that privmsg conversation was longer ago then one week since the last logout).

~the-y 1 year, 11 months ago

Another way to fix this would be to safe the open buffers. Currently the lastbuffer is already saved in ~/.cache/senpai/lastbuffer.txt. Something similiar could be done by saving all open buffers (or maybe only query buffers) to ~/.cache/senpai/buffers.txt.

~the-y 1 year, 11 months ago

~whynothugo 1 year, 6 months ago

Ideally the bouncer would handle keeping track of the buffers.

Relevant issue for soju: https://todo.sr.ht/~emersion/soju/187

~delthas closed duplicate ticket #134 6 months ago

~delthas 6 months ago

OK, I'd like to avoid reopening conversations with messages earlier than last close.

The real fix is indeed https://todo.sr.ht/~emersion/soju/187

Waiting on a soju spec to add this to senpai.

Register here or Log in to comment, or comment via email.