MUC MAM
MUC MAM
See #660
How to test the functionality
- step 1: Have mam enabled
- step 2: Join random muc scroll up
- step 3: rejoining muc should fetch messages sent since last online with profanity
I ran valgrind when using my new feature
no
TODO
- [X] Look up older history
- [X] Look up history when creating muc window
- [X] Look up newer history
- [ ] Fetch mam on incoming message (does a new muc even get created on incoming message ?)
- [ ] Fetch mam on reconnects
- [x] Scroll history even without mam
- [ ] Why loading message sometimes lingers? (when at the end of muc mam maybe?)
- [X] Why is a chatwin opened for each member of muc?
- [ ] Last messages appear doubled (maybe this only happens for chatwins?)
- [X] wrong timestamp for messages through mam on new join of muc
- [x] mentions/triggers show printed date not original date
- [x] respect mam setting
- [X] get all rsm results even from pagination
- [ ] Autocompletion has to be correct
- [ ] how to handle read indicator with mam
- [ ] valgrind
- [ ] make loading mam for muc faster if possible
- [x] Don't request history from muc
Fetch mam on incoming message (does a new muc even get created on incoming message ?)
I'm not sure I understand correctly. But: I think MAM only needs to be fetched for MUCs that are currently joined? Windows are only open for currently joined MUCs.
I'm not sure I understand correctly. But: I think MAM only needs to be fetched for MUCs that are currently joined? Windows are only open for currently joined MUCs.
I remember that chatwins are created/opened when the other party sends a message. I was thinking that maybe that was also happening for MUCs and so I would have to handle MAM in the case that the user is not the one that opens a mucwin by /joining it
@MarcoPolo-PasTonMolo, do you want help with this?
@MarcoPolo-PasTonMolo, do you want help with this?
Yes please. I don't have time to work on this. My code can be pretty garbage at times especially in iq.c so if you have any questions ask me. I think I would respond quicker in xmpp so Ill tag you there.
If I remember correctly MAM for MUCs is pretty much done. I had started implementing MAM for when a user gets reconnected but hit a few road blocks like how do I prevent new messages, that arrive while fetching mam after a reconnect, from getting jumbled up with the old ones from MAM. Or how do I load the actual MAM messages while also giving some feedback to the user so he doesn't think that the ui is stuck (like use pagination and fetch 10 messages at a time etc)
I mapped pagedown to trigger a disconnect so that testing is easier with a /reconnect interval of 5 seconds.
Here's what I had written down as TODO
== Reconnect mam ==
- [ ] Fetch more messages if not all fetched
- [X] Make it work
- [ ] refactor code to be cleaner and more understandable
= MUC MAM =
- [X] Look up older history
- [X] Look up history when creating muc window
- [X] Look up newer history
- [X] lost connection while loading messages
- [ ] Fetch mam on reconnects
- [ ] Why loading message sometimes lingers and doesn't disappear? (when at the end of muc mam maybe?)
- [ ] how to handle read indicator with mam
- [ ] Last messages appear doubled (maybe this only happens for chatwins?) when i get a new message from the contact while window is not open
- [ ] Autocompletion has to be correct
- [ ] make loading faster (or somehow show progress)
- [ ] Fetch mam on incoming message (does a new muc even get created on incoming message ?)
- [X] Scroll history even without mam
- [X] Why is a chatwin opened for each member of muc?
- [X] wrong timestamp for messages through mam on new join of muc
- [X] mentions/triggers show printed date not original date
- [X] respect mam setting
- [X] not showing history when mam is off,
- [X] and after first join and fetch of messages
- [X] get all rsm results even from pagination
- [ ] valgrind
- [ ] see if all added code is neccessary
- [ ] split first commit
- [ ] does it load multiple (does pagination work)? or did we distroy it with return 0 in rsm handler?
- [ ] no nick in front of messages in muc mam
- [ ] auto_chars
Thanks for your work and the summary @MarcoPolo-PasTonMolo !!
@ike08 @MarcoPolo-PasTonMolo slowly I have more free time to work on profanity again :) I was curious whether the same is true for one of you guys and whether you are still interested in implementing this feature. Cheers!
Not much time sorry