libera/#maemo-leste/ Monday, 2024-05-20

arno11yes there is all that stuff to check, indeed better tomorrow :)00:12
Wizzupfreemangordon: we have https://github.com/maemo-leste/userguide and https://github.com/maemo-leste/leste-manual12:24
WizzupI will make leste-manual contain the built documentation12:24
Wizzupand I will delete the empty userguide repo12:24
Wizzupok?12:24
d4dsctest13:06
dsc_strange13:06
WizzupI think I made a channel for testing13:07
WizzupI need to remember the name13:07
dsc_its not testing13:07
Wizzup##maemotest13:07
Wizzupok :D13:07
dsc_its my main d413:07
dsc_it didnt auto-join the channel upon reboot, lemme test13:08
dsc_:P yes its a test13:08
dsc_the touchscreen doesnt work when on power, thats normal right?13:11
dsc_or "expected behavior"13:11
Wizzupnot really13:13
siceloit works ... but may be janky due to capacitance (not exclusive to leste ... i.e. not software/OS related)13:35
WizzupI've seen some very bad chargers or cables occassionally throw it off13:36
dsc_:)13:39
Wizzupmaybe try a different cable13:40
Wizzup(for real)13:40
dsc_i only have 2 micro-usb cables13:41
dsc_they both have this13:41
Wizzupthis is with the 4 port charger?13:41
Wizzupand if you try a different outlet?13:41
dsc_both my d4's are turned off atm13:43
dsc_i have always had this issue I think13:44
dsc_yes with the 4 port charger13:44
dsc_which is fairly new13:44
Wizzupit's not about new or not, there could be many reasons for this to happen, which is ultimately a hw problem on the d4 but could also point to poor electricity13:45
dsc_also had this in my previous apartment13:46
Wizzuplike if I am in the airplane and plug into usb on the airplane I get a constant beep on my headphones, both on my x13 and d413:46
Wizzupit's probably worth getting another charger and cable just in case13:46
dsc_my d4 does not auto-connect to wifi @ boot15:41
dsc_I need to manually go to status bar -> Internet Connection -> click my WIFI AP15:41
dsc_"connect automatically" is turned on15:42
dsc_in addition, IRC is not auto-joining this channel upon connecting to WIFI15:45
Wizzupwell the auto joining is in conversations court15:52
Wizzupthe wifi happens because of a kernel bug, but it will try again later15:52
Wizzupoften it immediately says 'authentication timed out'15:52
dsc_kk15:52
dsc_so im calling joinChannel while there is no internet15:57
dsc_but did receive 'TelepathyAccount::onAccReady'15:58
dsc_i wonder how to check if its connected15:58
dsc_suppose we can try `TelepathyAccount::onOnline` :P15:59
freemangordonWizzup: currently we have issues with tp-haze and at least purple-fb in terms of marking messages as seen16:28
Wizzupyes, I don't think marking as read works at all16:28
Wizzupfor the remote side16:28
freemangordonI plan to fix that, by implement support for has_focus and PURPLE_CONV_UPDATE_UNSEEN16:28
freemangordonhowever, I will need some UI support as well,16:29
freemangordonlike - how do we know that the user has seen the messages16:29
freemangordonso far the only thing I found that is close to that is chat state16:29
freemangordonI don;t think TP has any other concept of user interaction16:30
freemangordonif you know any other way, please LMK16:30
freemangordonin either case, UI will have to set chat state16:30
Wizzupsounds good @ tp-haze fixing it :)16:30
WizzupI am in a call atm but can get back to you in a bit16:30
freemangordonok16:30
Wizzupback17:05
Wizzupfreemangordon: so conversations now has a way to mark messages as read in the database, based on whether the user has seen it17:05
WizzupI don't know how to communicate this over TP yet either17:05
freemangordonthis https://pastebin.com/hDTYtbGh17:06
freemangordonthere is no way to mark messages as read in libpurple :(17:06
freemangordonbut they have concept of 'has_focus'17:07
freemangordonbut that's implmentation detail anyway17:07
freemangordonhowever, conversations shall mark chat state no matter haze or not17:07
freemangordonthis https://telepathy.freedesktop.org/doc/telepathy-glib-1/telepathy-glib-text-channel.html#tp-text-channel-set-chat-state-async17:08
freemangordontp-glib, but in qt is the same17:08
Wizzupwhat state would we set here?17:08
WizzupI don't see one specifically for message(s) seen17:08
freemangordonit is not message state, but chat state :)17:08
freemangordonlike, I assume that if UI is visible to the user, then state is active17:09
Wizzupok17:09
Wizzupyeah, sure, we can do that17:09
freemangordonif user is typing, then obviously chat state is TP_CHANNEL_CHAT_STATE_COMPOSING17:09
freemangordonetc17:09
Wizzupyeah17:09
Wizzupno I get that17:09
freemangordonbut?17:10
WizzupI was just under the impressed we wanted to let remote parties know we saw the messages17:10
Wizzupunder the impression*17:10
freemangordonyes, that will allow at least haze to mark messages as seent17:10
freemangordon*seen17:10
freemangordonno idea how would that work for gabble17:10
freemangordonmaybe they act on message being ack-ed17:11
freemangordonbut that happens already17:11
freemangordonso no idea17:11
freemangordonI suggest to implement chat state and then to see if we still have issues17:11
freemangordonif you want more detail on how haze/purple behaves in terms of unseen messages, I can elaborate17:13
WizzupI think this can be worked on without a lot more info, if we just need to ste the chat state17:13
Wizzupof course if the user reads it while offline there is nothing we can do17:13
freemangordonlets first make happy path functional17:14
freemangordonwill try to support corner cases afterwards17:14
freemangordonre offline - that should not be an issue if we support duplicated messages matching17:16
Wizzupright now I don't think we reliably get message history upon (re)connect17:17
Wizzupthe only one I get this for is telegram17:17
WizzupI don't know if that is in haze or converastions17:18
Wizzupconversations17:18
freemangordonwe get correct history from FB as well17:18
freemangordonhaze/FB that is17:18
freemangordonno idea about the others17:18
Wizzuphow does it know what new messages to send?17:18
Wizzupdoes the pruple plugin implement message markers or something?17:18
Wizzuplike, how does it know where to continue17:18
freemangordonbut FB is complicated enough to cover more if not all of the usecases17:18
WizzupI care mostly for the xmpp path, but yeah :)17:18
freemangordonFB knows17:19
freemangordonit just resends starting from the first unseen17:19
freemangordonfor xmpp I have no idea17:19
freemangordonbut again, lets have chat states first17:20
freemangordonwill iron it out as it comes17:20
Wizzupinteresting, so it must keep some state then17:20
Wizzuplike telegram17:21
freemangordonFB?17:21
freemangordonsure17:21
WizzupI mean keep state on the d417:21
freemangordonno17:21
freemangordonwhay shall we?17:21
freemangordon*why17:21
Wizzupto know exactly what message was last received17:21
freemangordonwhy do we care?17:21
Wizzuphow can you know, if the client just authenticates but doesn't say what it last saw, what to send?17:22
freemangordonserver sends the first message it didn;t get the "seen" notification17:22
Wizzupbut we don't send the seen notification17:22
Wizzupso it's entirely based on you using it elsewhere17:23
Wizzupand this 'seen' state is shared with all devices17:23
freemangordonno, you send "ack"17:23
freemangordonand yes, it is shared17:23
Wizzupok, so if you put your d4 on and it gets them, and then your bionic, the bionic won't get the messages17:23
Wizzupis my point17:23
freemangordonyes17:23
Wizzupwhich is fine, but with telegram it keeps local state and this is why it knows exactly what to deliver17:24
freemangordonwhich is pretty normal17:24
Wizzupin 2008 :)17:24
Wizzupfor xmpp we will also need some message markers support with some local data17:24
WizzupI'm not being negative, just stating where I think we should try to get to17:24
freemangordonare you sure it is 2008?17:24
freemangordonno, no, I understand17:24
freemangordonI will ask my GF, to power-off her android when she is back home17:25
freemangordonand will chat with her in FB17:25
freemangordonto test if device is going to get the full history17:25
freemangordonalso, it is possible that fb-purple does not support the full FB protocol functionality17:25
freemangordonor to not expose it to pidgin, as it does not have concept of ack by message, IIUC17:26
WizzupI understand17:30
WizzupI'm pretty sure that currently we don't do message fetching for the most part, except in telegram but that is by accident17:30
Wizzup(and it also needs work)17:30
freemangordonand I am sure purple-fb receives all the unseen messages every time I log to FB from VM or d4 :D17:31
freemangordonhundreds of messages that is ;)17:31
freemangordonso it is not a minor issue17:31
Wizzupyeah17:35
Wizzupit probably takes a while to process them too, eh?17:35
Wizzupat least that is what happens for me now, it vibrates and makes sound for each of them :D17:35
freemangordonno, but makes fb chat useless17:35
freemangordonah, right17:35
freemangordonso, which plugin do you have issues with?17:36
freemangordontp-gabble, or telegram through haze?17:36
freemangordonor?17:36
Wizzupsorry, what issues specifically?17:40
freemangordonrepeated messages17:40
WizzupI do not have this problem17:40
freemangordonah17:40
freemangordonok17:40
Wizzupbut when I connect telegram I might get like 50+ messages since i was last online17:41
Wizzup(I'm not popular, it's just some irc channel bridged to some telegram channel)17:41
freemangordonwell, isn;t that a good feature actually?17:41
Wizzupit is, but they should be a single batch17:41
Wizzupnow it is as if the messages are coming in at real time17:41
Wizzupso it will be vibration in my pocket for minutes17:41
Wizzupvibrating17:41
Wizzupbut this is a conversations issue mostly, not tp per se17:41
freemangordonI see17:41
freemangordonright17:41
dsc_i was going to fix that today or tomorrow17:42
freemangordonI think there is a way to get pending messages17:42
freemangordonWizzup: ok, please LMK when you are ready with chat state17:43
freemangordonI think it is not *that* easy to be implemented though17:43
freemangordonas you have to account for chat window being active (maximized), but device is not locked, etc17:44
freemangordondsc_: oh, please, fix focus lost issue in chat edit widget17:45
freemangordonon send button pressed, edit field should not lose focus17:45
dsc_ah ok17:45
dsc_easy fix17:45
freemangordonright17:45
freemangordonsorry for not doing it by myself, but it will take me a while to find which form/class is that17:46
dsc_yeah17:46
dsc_im actually using d4 as my main now, dogfooding17:47
freemangordonI need few more things working properly first17:48
freemangordonconversations being one of them17:48
Wizzupfor me it's just dtmf now ;p18:05
Wizzupbut I guess I could try to play dtmf tones for now using some other device18:05
sicelowhich reminds me - lately i notice that i receive each sms 2 or 3 times on droid 4. haven't checked who/what's responsible for that19:35
Wizzupsicelo: we haven't seen that in a long time19:45
siceloyes i thought so. i get it everytime now.19:51
freemangordonWizzup: sorry, but I didn't get it: do you plan to implement chat state in conversations any time soon?19:53
Wizzupfreemangordon: I can try to look at it this week..20:35
freemangordonWizzup: dsc_: I can look as well, but I need some hints where is the proper place for doing it21:16
Wizzupfreemangordon: it feels to me like src/chatwindow.cpp has ChatWindow and then we can hook to its signals to get activated, focussed, deactivated, tec21:33
Wizzups/tec/etc/21:33
WizzupI'd ignore the 'is typing...' for now21:33
Wizzupand then we need to match it to a conversations channel21:34
Wizzups/conversations/telepathy/21:34
Wizzupwhich we can do based on group uid21:37
Wizzupor remote_uid rather I guess21:38
Wizzupwe have TelepathyAccount::hasChannel21:39
freemangordonWizzup: I guess I have to add those signals, no?21:43
Wizzupyes, you can if you want to :)21:44
freemangordonok, will try21:44
Wizzupthe code to handle the telepathy side should probably go in src/lib/tp.cpp21:44
WizzupI can't do it tonight21:44
freemangordonok, will try to cook some code21:44
freemangordonugh:21:58
freemangordon14033 user      20   0 3465432   1.5g   8824 S   0.0  38.1   0:28.43 conversations21:58
dsc_freemangordon: not sure what you're doing right now but feel free to delegate work to me and/or ask questions21:59
freemangordondsc_: trying to implement TP chat state support21:59
freemangordonok, thanks, lemme spend some time on it and if needed will ask for help22:00
dsc_state = "now typing..." ?22:00
freemangordonmhm22:00
Wizzupdsc_: well more like window has been active / is active22:01
WizzupI don't think the typing... notification is the goal here per se22:01
Wizzupfreemangordon: yeah there's definitely still some memory issues to figure out22:01
dsc_more accurate readings via: https://raw.githubusercontent.com/pixelb/ps_mem/master/ps_mem.py22:19
dsc_python3 ps_mem.py -p <pid>22:20
WizzupI am getting about 20-30MB for every incoming message it seems22:20
Wizzup220.7 MiB +   7.8 MiB = 228.5 MiBconversations22:20
Wizzup--------------------------------- 228.5 MiB22:20
Wizzup=================================22:20
Wizzupwas 32MiB before22:20
dsc_did you open the window too?22:20
Wizzupstopped here, after I didn't get more messages22:20
Wizzup# python ps_mem.py -p 469422:20
Wizzup Private  +   Shared  =  RAM usedProgram22:20
Wizzup238.7 MiB +   7.8 MiB = 246.5 MiBconversations22:20
Wizzup---------------------------------22:20
Wizzup                        246.5 MiB22:20
Wizzup=================================22:20
Wizzupno, the screen was off22:20
dsc_interesting22:20
Wizzupclosed the notifications and no resources were freed22:20
Wizzupso there's definitely something going on, but I've also seen this before22:21
Wizzupwe had an issue before where the rtcom instance wasn't being freed22:21
WizzupI think fmg fixed it but the code also changed again22:21
Wizzupit could also be related to notifications22:21
dsc_looking into the mem stuff now22:27
freemangordondsc_: what about https://pastebin.com/9TrJchKW22:33
freemangordonif that's ok, I need a hint how to get from chat windot to TpTextChannel (or whatever tpqt's class is)22:34
WizzupI think hasChannel as mentioned above on our tp account class will give you that22:34
dsc_freemangordon: cool :)22:35
dsc_good q, let me check.22:35
freemangordonWizzup: ok, will try22:35
Wizzupyou would still need to iterate the accounts though22:36
freemangordonwait, chat window has channel() and remote_uid()22:36
dsc_I fear the signal would also need to pass an identifier of some kind22:37
dsc_remote_uid most likely22:37
freemangordonI will add that22:37
freemangordonbut which one?22:37
freemangordonchannel() or remote_uid()?22:37
freemangordonoh, wait22:37
freemangordonthis is ChatMessage22:37
dsc_m_local_uid but im not 100% sure22:38
dsc_rtcom terminology22:38
Wizzupm_local_uid is likely not a channel22:38
freemangordonmhm22:38
Wizzupthat will at best map to a tp account22:38
dsc_but ill check for you22:38
freemangordonthanks22:39
freemangordonugh, what a hackery :) https://github.com/maemo-leste/conversations/blob/master/src/mainwindow.cpp#L9322:41
freemangordonso, is it possible to have multiple channels per ChatWindow?22:42
WizzupI don't think so, what would that look like22:42
dsc_[D] [chatwindow.cpp::34] m_local_uid "idle/irc/d4dsc0"22:43
dsc_[D] [chatwindow.cpp::35] m_channel "##maemotest"22:43
dsc_[D] [chatwindow.cpp::36] groupchat true22:43
Wizzupyes, the local_uid is you22:43
Wizzupthat won't help find the channel22:43
Wizzupyou need the remote_uid for this22:43
freemangordonno idea, just asking while trying to understand why ChatWindow does not have 'channel' property22:43
WizzupI don't recall exactly why, but I believe dsc wanted to keep tp specific code out of the ui code22:44
dsc_no22:44
Wizzupok22:44
Wizzupin any case there's a lot of work that I have to do to make the tp.cpp interface more 'accessible' from outside22:44
freemangordonok, I think of 2 options here:22:45
dsc_the way chatWindow instanciates is a relic of when we were still figuring out how to even implement tpqt22:45
freemangordonin ChatWindow constructor, extract channel from ChatMessage and keep it for further usage22:45
freemangordonadd channel to ChatWindow constructor22:46
freemangordonany other ideas?22:46
dsc_for clarity; you mean `TelepathyChannel` right?22:47
dsc_because it has a m_channel property currently, a hacky string22:47
freemangordonI was about to ask what is m_channel :)22:47
dsc_see output above22:47
freemangordonand yeah, I need TelepathyChannel somewhere down the pipe22:47
dsc_but yes the constructor is highly suspicious22:47
freemangordonok, what is "##maemotest"?22:48
Wizzup##maemotest on libera22:48
freemangordonah, so option 1 is already in place22:48
freemangordonok, can I use that to get TpChannel somehow?22:49
Wizzupyes, if m_channel is the same as remote_uid, then hasChannel give you the channel22:49
freemangordondon;t understand that22:50
freemangordonand what if its not?22:50
dsc_im looking how to do option 122:50
dsc_sec22:51
freemangordondsc_: it is already there22:51
dsc_yes, but to get it to tpqt22:51
freemangordonhttps://github.com/maemo-leste/conversations/blob/master/src/chatwindow.cpp#L3222:51
dsc_yep22:51
freemangordonthat's easy, the question is how to map that string to TpChannel?22:52
freemangordonWizzup: if m_channel is the same as remote_uid, why we have both?22:52
dsc_there's `channels`, property of TelepathyAccount, which is a QMap, so easy lookup22:52
dsc_let me confirm though22:52
freemangordonright, but key there seems to be remote_uid22:52
WizzupI cannot answer that right now the channel name isn't always the remote_uid iirc22:53
Wizzup22:53 < dsc_> there's `channels`, property of TelepathyAccount, which is a QMap, so easy lookup22:54
Wizzupthis is what hasChannel does22:54
Wizzupgiven a remote_uid22:54
freemangordonseems there is either bug or... dunno22:56
freemangordonsee https://github.com/maemo-leste/conversations/blob/master/src/lib/tp.cpp#L59822:56
freemangordonvs https://github.com/maemo-leste/conversations/blob/master/src/lib/tp.cpp#L61422:56
freemangordonand https://github.com/maemo-leste/conversations/blob/master/src/lib/tp.cpp#L57022:56
dsc_right. its m_channel, not remote_uid.22:56
dsc_void TelepathyAccount::leaveChannel(const QString &channel) { <== this one is correctly named22:57
freemangordonremote_uid is inited from m_nickname22:57
Wizzupyou probably realised this already but the problem with giving a chatwindow a direct pointer to a tp channel or account is that they can get invalidated22:57
freemangordonso this cannot be key22:57
dsc_freemangordon: correct :)22:57
dsc_so22:57
freemangordonWizzup: why not using shared pointgers?22:58
freemangordon*pointers22:58
WizzupI don't know what it means but the thing can still stop existing or be invalidated at any time22:58
dsc_im not too worried about invalidating stuff22:58
dsc_since we get signals for it22:58
dsc_anyway22:58
dsc_https://github.com/maemo-leste/conversations/blob/master/src/lib/tp.cpp#L14022:58
Wizzupyes, but then you need a mechanism to find the new one22:58
dsc_this is a helper thing22:58
Wizzupat which point you could use that mechanism anyway?22:59
dsc_it loops the accounts (backends) to find the right one22:59
dsc_so in your case22:59
dsc_you want to communicate 'state'22:59
freemangordonmhm22:59
dsc_Telepathy::setState(...) with a similar helper thing that loops the accounts22:59
freemangordonshall I add similar slot?22:59
dsc_right22:59
freemangordonok22:59
dsc_then in `Conversations::onChatStateChanged` you can call this->telepathy->setState()23:00
freemangordonmhm23:00
dsc_and then also `TelepathyChannel::setState()`23:00
freemangordonshall I rename the parameter in hasChannel?23:00
dsc_or hmm, maybe you need 3 layers, not sure23:00
dsc_freemangordon: yes23:01
freemangordonyeah, maybe, will see23:01
freemangordonok23:01
dsc_good catch btw, yes its confusing, remote_uid is wrong there23:01
dsc_Wizzup: ive been wanting to refactor ChatWindow since I first made it but it was not possible since we're refactoring tp code every X months23:02
dsc_well not refactoring, just working on it :)23:02
dsc_not sure what exactly to provide chatWindow23:02
dsc_but giving 20 variables like we do now is kinda sus23:03
WizzupI think the group_uid should be the primary key for most things23:03
WizzupI did rework most of the UI code to use this, but I am not sure if I did it everywhere23:03
dsc_this QMap lookup stuff btw, was my last tp refactor23:03
Wizzuptbh there are some valid remote_uid lookups when coupled with account23:03
WizzupI guess it was QList before or something?23:04
WizzupI know I set it up to track all of these things23:04
dsc_yeah, it was QList23:05
dsc_btw, you could also access 'conversations.telepathy' from mainwindow via `m_ctx->telepathy`, or even directly from chatWindow23:08
freemangordonhmm, ok23:08
freemangordongetContext()?23:09
dsc_up to you, sometimes I prefer to keep some logic in m_ctx instead of chatwindow, so that if we'd have another interface, maybe a text-based chat client, you wont have to reimplement stuff thats only in ChatWindow23:10
dsc_just `m_ctx->telepathy->...`23:10
dsc_it sets up m_ctx in the constructor23:10
freemangordonok23:10
Wizzupuvos: on razr/xt912, we don't see glitching problems in the tty right, just in X?23:21
freemangordonok, seems I have some working code23:36
dsc_nice23:39
freemangordonok, it seems channel is group id of group chat and remote id is accoutn id when single-user chat23:50

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!