Add URI for Service Discovery (XEP-0030);
Remove scheme "xmpp" from local@hostname (was xmpp:local@hostname); Add more notes to the README document.
This commit is contained in:
parent
0d2e55fa14
commit
16338fabb2
2 changed files with 23 additions and 10 deletions
11
README.md
11
README.md
|
@ -10,13 +10,15 @@ browsers.
|
||||||
It also provides an interface to explore XMPP server conferences, pubsub and
|
It also provides an interface to explore XMPP server conferences, pubsub and
|
||||||
other services.
|
other services.
|
||||||
|
|
||||||
### Reasons for creating of FASI
|
### Reasons for creating FASI
|
||||||
|
|
||||||
The main reasons for the realization of FASI are:
|
The main reasons for the realization of FASI are:
|
||||||
|
|
||||||
- Add interactive capabilities, as well as vCard information;
|
- Add interactive capabilities, as well as vCard information;
|
||||||
- Create rapport with the viewers, by displaying vCard information, such as Full
|
- Create rapport with the viewers, by displaying vCard information, such as Full
|
||||||
Name and Description or Note;
|
Name and Description or Note;
|
||||||
|
- Realize the beautiful simplicity of XMPP, so that more people would be
|
||||||
|
motivated to utilize, install, serve, and develop XMPP software;
|
||||||
- Charm our "normie" friends, so called, by displaying an attractive contact
|
- Charm our "normie" friends, so called, by displaying an attractive contact
|
||||||
HTML page, which they can also utilize;
|
HTML page, which they can also utilize;
|
||||||
- Utilize an invitation page, with XMPP capabilities, regardless to the software
|
- Utilize an invitation page, with XMPP capabilities, regardless to the software
|
||||||
|
@ -84,7 +86,12 @@ AGPL-3.0-only
|
||||||
|
|
||||||
Schimon Jehudah Zachary 2024
|
Schimon Jehudah Zachary 2024
|
||||||
|
|
||||||
# Similar Projects
|
## Thanks
|
||||||
|
|
||||||
|
A special thank you for Mr. Georg Lukas who has exposed the HTML invitation page
|
||||||
|
to the founder of this project.
|
||||||
|
|
||||||
|
## Similar Projects
|
||||||
|
|
||||||
- [Easy XMPP Invitation Landing Page](https://github.com/modernxmpp/easy-xmpp-invitation) from Mr. Georg Lukas;
|
- [Easy XMPP Invitation Landing Page](https://github.com/modernxmpp/easy-xmpp-invitation) from Mr. Georg Lukas;
|
||||||
- [mod_invite](https://modules.prosody.im/mod_invite.html) module for Prosody.
|
- [mod_invite](https://modules.prosody.im/mod_invite.html) module for Prosody.
|
||||||
|
|
22
fasi.py
22
fasi.py
|
@ -94,7 +94,7 @@ class HttpInstance:
|
||||||
title = node_name
|
title = node_name
|
||||||
link_href = 'xmpp:{}?pubsub;node={};action=subscribe'.format(jid_bare, node_name)
|
link_href = 'xmpp:{}?pubsub;node={};action=subscribe'.format(jid_bare, node_name)
|
||||||
link_text = 'Subscribe'
|
link_text = 'Subscribe'
|
||||||
xmpp_uri = 'xmpp:{}?;node={}'.format(jid_bare, node_name)
|
xmpp_uri = '{}?;node={}'.format(jid_bare, node_name)
|
||||||
|
|
||||||
# Start an XMPP instance and retrieve information
|
# Start an XMPP instance and retrieve information
|
||||||
xmpp_instance = XmppInstance(jabber_id, password, jid_bare)
|
xmpp_instance = XmppInstance(jabber_id, password, jid_bare)
|
||||||
|
@ -328,23 +328,26 @@ class HttpInstance:
|
||||||
message = '{}: {} (XEP-0030)'.format(jid_info['text'], jid_info['condition'])
|
message = '{}: {} (XEP-0030)'.format(jid_info['text'], jid_info['condition'])
|
||||||
action = 'Connect with'
|
action = 'Connect with'
|
||||||
link_text = 'Connect'
|
link_text = 'Connect'
|
||||||
link_href = xmpp_uri = 'xmpp:{}'.format(jid_bare)
|
link_href = 'xmpp:{}'.format(jid_bare)
|
||||||
|
xmpp_uri = jid_bare
|
||||||
elif jid_kind in ('conference', 'server'):
|
elif jid_kind in ('conference', 'server'):
|
||||||
action = link_text = 'Discover'
|
action = link_text = 'Discover'
|
||||||
if jid_kind == 'conference':
|
if jid_kind == 'conference':
|
||||||
instance = 'conferences'
|
instance = 'conferences'
|
||||||
elif jid_kind == 'server':
|
elif jid_kind == 'server':
|
||||||
instance = 'services'
|
instance = 'services'
|
||||||
link_href = xmpp_uri = 'xmpp:{}'.format(jid_bare)
|
link_href = 'xmpp:{}?disco;type=get;request=items'.format(jid_bare)
|
||||||
view_href = '/d/' + jid_bare
|
view_href = '/d/' + jid_bare
|
||||||
|
xmpp_uri = jid_bare
|
||||||
elif jid_kind in ('mix', 'muc'):
|
elif jid_kind in ('mix', 'muc'):
|
||||||
#title = 'Group Chat ' + title
|
#title = 'Group Chat ' + title
|
||||||
# TODO Set group chat subject as description.
|
# TODO Set group chat subject as description.
|
||||||
action = 'Join to'
|
action = 'Join to'
|
||||||
instance = 'participants'
|
instance = 'participants'
|
||||||
link_text = 'Join'
|
link_text = 'Join'
|
||||||
link_href = xmpp_uri = 'xmpp:{}?join'.format(jid_bare)
|
link_href = 'xmpp:{}?join'.format(jid_bare)
|
||||||
view_href = '/v/' + jid_bare
|
view_href = '/v/' + jid_bare
|
||||||
|
xmpp_uri = jid_bare
|
||||||
# room_info = await XmppXep0045.get_room_data(xmpp_instance, jid_bare)
|
# room_info = await XmppXep0045.get_room_data(xmpp_instance, jid_bare)
|
||||||
# breakpoint()
|
# breakpoint()
|
||||||
elif jid_kind == 'pubsub':
|
elif jid_kind == 'pubsub':
|
||||||
|
@ -353,19 +356,22 @@ class HttpInstance:
|
||||||
action = 'Subscribe to'
|
action = 'Subscribe to'
|
||||||
instance = 'articles'
|
instance = 'articles'
|
||||||
link_text = 'Subscribe'
|
link_text = 'Subscribe'
|
||||||
link_href = xmpp_uri = 'xmpp:{}?pubsub;node={};action=subscribe'.format(jid_bare, node_name)
|
link_href = 'xmpp:{}?pubsub;node={};action=subscribe'.format(jid_bare, node_name)
|
||||||
view_href = '/d/{}/{}'.format(jid_bare, node_name)
|
view_href = '/d/{}/{}'.format(jid_bare, node_name)
|
||||||
|
xmpp_uri = '{}?;node={}'.format(jid_bare, node_name)
|
||||||
else:
|
else:
|
||||||
action = link_text = 'Browse'
|
action = link_text = 'Browse'
|
||||||
instance = 'nodes'
|
instance = 'nodes'
|
||||||
link_href = xmpp_uri = 'xmpp:{}'.format(jid_bare)
|
link_href = 'xmpp:{}?disco;type=get;request=items'.format(jid_bare)
|
||||||
view_href = '/d/' + jid_bare
|
view_href = '/d/' + jid_bare
|
||||||
|
xmpp_uri = jid_bare
|
||||||
else:
|
else:
|
||||||
action = link_text = 'Message'
|
action = link_text = 'Message'
|
||||||
instance = 'articles'
|
instance = 'articles'
|
||||||
link_href = xmpp_uri = 'xmpp:{}?message'.format(jid_bare)
|
link_href = 'xmpp:{}?message'.format(jid_bare)
|
||||||
node_name = 'urn:xmpp:microblog:0'
|
node_name = 'urn:xmpp:microblog:0'
|
||||||
view_href = '/d/{}/{}'.format(jid_bare, node_name)
|
view_href = '/d/{}/{}'.format(jid_bare, node_name)
|
||||||
|
xmpp_uri = jid_bare
|
||||||
|
|
||||||
# JID item count
|
# JID item count
|
||||||
count = None
|
count = None
|
||||||
|
@ -465,7 +471,7 @@ class HttpInstance:
|
||||||
xmpp_instance.disconnect()
|
xmpp_instance.disconnect()
|
||||||
|
|
||||||
# QR code
|
# QR code
|
||||||
Graphics.generate_qr_code_graphics_from_string(xmpp_uri, jid_bare)
|
Graphics.generate_qr_code_graphics_from_string(link_href, jid_bare)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
exception = str(e)
|
exception = str(e)
|
||||||
|
|
Loading…
Reference in a new issue