~emersion/public-inbox

gamja: Make use of destBuffers when fetching history v1 SUPERSEDED

Hello,
When soju restarts while gamja is opened, I often end up with saslserv
or chanserv getting their own buffer. This was due to `target.name`
being used. I'm unsure/preserving behavior with the following:

- For `destBuffers`, it does not make sense to me that a message loaded
from history could get in multiple buffers.
- I'm only keeping `target.name` there because it was there before, it
hits messages like JOIN for example, since this was sent before i still
send it, but i don't think there's much value in doing that.

Have a good day!

xse (1):
  Make use of destBuffers when fetching history.

 components/app.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

-- 
2.34.4
#827792 .build.yml success
gamja/patches/.build.yml: SUCCESS in 51s

[Make use of destBuffers when fetching history][0] from [~xse][1]

[0]: https://lists.sr.ht/~emersion/public-inbox/patches/34820
[1]: mailto:xse@riseup.net

✓ #827792 SUCCESS gamja/patches/.build.yml https://builds.sr.ht/~emersion/job/827792
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~emersion/public-inbox/patches/34820/mbox | git am -3
Learn more about email & git

[PATCH gamja 1/1] Make use of destBuffers when fetching history. Export this patch

From: xse <xse@krkrkr.org>

Fixes an issue where messages intended to go on the server's buffer end up on their own
---
 components/app.js | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/components/app.js b/components/app.js
index d4a100d..d521f64 100644
--- a/components/app.js
+++ b/components/app.js
@@ -1119,7 +1119,9 @@ export default class App extends Component {
				client.fetchHistoryBetween(target.name, from, to, CHATHISTORY_MAX_SIZE).then((result) => {
					for (let msg of result.messages) {
						let destBuffers = this.routeMessage(serverID, msg);
						for (let bufName of destBuffers) {
						if(destBuffers.length) {
							destBuffers.forEach(bufName => this.addMessage(serverID, bufName, msg));
						} else {
							this.addMessage(serverID, target.name, msg);
						}
					}
-- 
2.34.4
gamja/patches/.build.yml: SUCCESS in 51s

[Make use of destBuffers when fetching history][0] from [~xse][1]

[0]: https://lists.sr.ht/~emersion/public-inbox/patches/34820
[1]: mailto:xse@riseup.net

✓ #827792 SUCCESS gamja/patches/.build.yml https://builds.sr.ht/~emersion/job/827792