Hubzilla Brasil
Entrar
Hubzilla Brasil
Entrar
System Apps
Ajuda
Canal aleatório
Diretório
Idioma
Pesquisar
Public Stream
QRator
Report Bug
Thu, 01 Aug 2019 06:52:28 -0300
Ver perfil
Mario Vavti
via
Zotlabs|Hubzilla Development
mario@hub.somaton.com
We don't have a
is_logged_in($channel_id)
function do we?
!!
zotlabs.org | Hubzilla Development
Link para a origem
show all
6 comentários
Thu, 01 Aug 2019 10:22:33 -0300
última edição: Thu, 01 Aug 2019 10:22:20 -0300
Ver perfil
M. Dent
dm42@hub.webgoeslocal.net
That precise function? Or some equivalent?
I don't think we have that function itself. And there's no way really to know if a 3rd party is logged in since "login" is determined by the existence of browser cookies - and there's no way to know if a given 3rd browser has a valid cookie. So, I think we've relied on "local_channel()".
I guess maybe a little more context?
Link para a origem
Thu, 01 Aug 2019 10:51:59 -0300
Ver perfil
Alexandre Hannud Abdo
aleabdo@hubzilla.com.br
In redmatrix times there used to be an indicator on your profile (a green asterisk) of whether you were "online".
Link para a origem
Thu, 01 Aug 2019 11:43:06 -0300
Ver perfil
Mario Vavti
mario@hub.somaton.com
The online status is still available. This comes from the chat app iirc and is not very reliable...
@
M. Dent
i would like the item_store hook to do something for the channel which item is being stored. But only if the channel is logged in.
Link para a origem
Thu, 01 Aug 2019 15:07:07 -0300
última edição: Thu, 01 Aug 2019 15:06:55 -0300
Ver perfil
M. Dent
dm42@hub.webgoeslocal.net
Would it be running as part of a web request from the logged-in channel? That is would "local_channel()" fit the bill? Or is this something being stored by a process kicked off through some other mechanism?
If it's another mechanism, I'm not exactly sure how you would determine the user is "logged-in". I suppose you could set something in pconfig like "last_seen" with a datestamp that updates with each interaction. If that's not more than _x_ seconds in the past, assume the user is "logged in" still.
I don't think we want to maintain a permanent connection with the server, as that could be resource intensive. Maybe update last_seen as part of Zotlabs/Modules/Ping.php? (This appears to be the approach of the chatpresence routines).
Those are my quick answers.
Link para a origem
Thu, 01 Aug 2019 15:13:28 -0300
Ver perfil
Mario Vavti
mario@hub.somaton.com
No, it would not be a web request of a logged in channel.
I guess i'll look for another solution...
Link para a origem
Fri, 02 Aug 2019 01:41:24 -0300
Ver perfil
El Dorado
mike@z.macgirvin.com
Not perfect, but have a look at
include/channel.php:function get_online_status($nick)
Link para a origem
Conversation Features
Carregando...
Conversation Features
Carregando...
Entrar
Email or nickname
Senha
Lembrar de mim
Entrar
Registrar
Password Reset
Autenticação remota