Comments (5)
OMEMO messages can only be decrypted once.
When Profanity receives such a message it decrypts it and stores it in the sqlite DB. When you quit Profanity and start it later again and join a MUC it will load the messages from this DB. There are some things that play into this as well like: MAM. The server I use supports MAM and I have MAM enabled in Profanity, the messages are shown correctly when I join a MUC again.
If you don't have MAM enabled we will receive the last X messages from the server again (limited amount, I forgot the exact number) when we join a MUC. They will be OMEMO encrypted too and we won't be able to decrypt them since it's only possible to do this once. Maybe you are seeing this? I'm not sure right now what we do in this case would have to check the code.
Can you make sure you have MAM enabled? Or use PG UP key to scroll up and (re)load messages from the DB?
from profanity.
MAM is enabled, but according to the documentation for /mam it's not supported for MUCs. Using PG UP doesn't load anything in these MUCs, even though I know there are previous messages.
from profanity.
Sorry I was confused.
MUC MAM is WIP here: #1862
from profanity.
@H3rnand3zzz didnt we implement that we load messages from DB when we scroll up even when MAM is not available?
from profanity.
@H3rnand3zzz didnt we implement that we load messages from DB when we scroll up even when MAM is not available?
The functionality always was there, take a look at a commented version:
if (first_entry && !(first_entry->theme_item == THEME_ROOMINFO && g_strcmp0(first_entry->message, LOADING_MESSAGE) == 0)) { // if chat is not empty
if (*scroll_state != WIN_SCROLL_REACHED_TOP) { // if we haven't reached top of the DB yet
*scroll_state = !chatwin_db_history(chatwin, NULL, NULL, TRUE) ? WIN_SCROLL_REACHED_TOP : WIN_SCROLL_INNER; // update current reach_top_of_the_db state
}
if (*scroll_state == WIN_SCROLL_REACHED_TOP && prefs_get_boolean(PREF_MAM)) { // if we reached top of the DB, fetch MAM
win_print_loading_history(window);
iq_mam_request_older(chatwin);
}
So, long tale short, the only time we fetch MAM now is when we reach top of the DB && MAM is enabled. But otherwise, MAM or not, we fetch the data from DB. Also as far as I remember, it always was kind of this way, just without reached_top state, so we always made (sometimes useless) DB request.
P.S. Sorry for the late response, please use other means of communications in the future.
from profanity.
Related Issues (20)
- Wrong time stamps in messages (presumably) from MAM
- Iconsistent status message when downloading files HOT 3
- Wrong error about server not supporting MAM. HOT 2
- older messages not loading. HOT 8
- Substantial memory leak on aarch64 and x86_64 architectures
- Mouse selection is not working properly HOT 9
- `/cmd list <muc>` doesn't list MUC adhoc commands HOT 2
- connection seems to fail, despite what the client thinks HOT 15
- `/url save` and `/sendfile` do nothing after introducing Gmainloop HOT 7
- Crash with SIGABRT with libstrophe-0.13.0 HOT 8
- Slashguard doesn't work HOT 2
- Profanity starts talking OTR if you paste a message containing a body with an OTR start message HOT 1
- Unable to connect to selfhosted prosody server HOT 2
- Lock files for resources in use
- url command ignores own messages
- Seg fault on connection attempt HOT 19
- glib error when open private chat HOT 3
- Rename `/reconnect now` -> `/reconnect`
- Auto save recieved files HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from profanity.