Hubzilla Brasil
Entrar
Hubzilla Brasil
Entrar
System Apps
Ajuda
Canal aleatório
Diretório
Idioma
Pesquisar
Public Stream
QRator
Report Bug
2019-08-01 06:52:28
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
2019-08-01 10:22:33
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
2019-08-01 10:51:59
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
2019-08-01 11:43:06
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
2019-08-01 15:07:07
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
2019-08-01 15:13:28
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
2019-08-02 01:41:24
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