• Telegram and JavaScript

    From John Dovey@4:920/69.1 to All on Thursday, April 21, 2022 16:08:34

    Hi,
    This probably fits better in Future4Fido, but figured I'd mention here.

    Telegram has just updated their Bit spec, and it's now possible to run/launch a JavaScript app
    directly from the client.

    I'm not much of a JavaScript person, but glancing quickly at the spec and some examples, it occurs to me that one of the gurus in the area could possibly port a lot of the functionality of SBBS across.

    Thoughts?

    JD
    --- AfterShock/Android 1.6.8
    * Origin: Firecat Mobile (4:920/69.1)
  • From echicken@1:103/705 to John Dovey on Friday, April 22, 2022 03:25:20
    Re: Telegram and JavaScript
    By: John Dovey to All on Thu Apr 21 2022 16:08:34

    Telegram has just updated their Bit spec, and it's now possible to run/launch a JavaScript app directly from the client.

    I'd be curious to know more about what this actually means. Got a link?

    I'm not much of a JavaScript person, but glancing quickly at the spec and some examples, it occurs to me that one of the gurus in the area could possibly port a lot of the functionality of SBBS across.

    Porting a Synchronet JS module to some other JS environment means that basically all of this becomes unavailable:

    https://synchro.net/docs/jsobjs.html

    The script needs to be updated to use whatever analagous things exist on the target platform. That's fairly straightforward when it comes to stuff like the File and Socket classes, the global methods, and some of the console methods, but will get trickier when you get into users, messages, files, etc.

    The tricky stuff is often also the reason for the script existing in the first place. If you're writing a script for Synchronet, there's a good chance it's going to access a bunch of BBS-specific data that won't exist on some other platform.

    This probably fits better in Future4Fido, but figured I'd mention here.

    The FTN stuff might be easier to port, actually, but I'm trying to picture what purpose it would serve when running ... in the Telegram app, I gather? Is it useful to run a binkp mailer inside that app, for example?

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    ---
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From John Dovey@4:920/69.1 to echicken on Friday, April 22, 2022 10:35:16

    Re: Telegram and JavaScript
    By: John Dovey to All on Thu Apr 21 2022 16:08:34

    Telegram has just updated their Bit spec, and it's now possible to
    run/launch a JavaScript app directly from the client.

    I'd be curious to know more about what this actually means. Got a link?


    It's a long description, but you can start here : https://core.telegram.org/bots/samples


    This probably fits better in Future4Fido, but figured I'd mention here.

    The FTN stuff might be easier to port, actually, but I'm trying to picture what purpose it would serve when running ... in the Telegram app, I gather? Is it useful to run a binkp mailer inside that app, for example?


    Off the top of my head, a few of the things that might fit with a bot integration might be
    - access to file areas
    - download of mail (like a QWK door)
    - a binkp like transfer of mail packets
    etc

    JD
    --- AfterShock/Android 1.6.8
    * Origin: Firecat Mobile (4:920/69.1)
  • From echicken@1:103/705 to John Dovey on Friday, April 22, 2022 18:46:27
    Re: Telegram and JavaScript
    By: John Dovey to echicken on Fri Apr 22 2022 10:35:16

    Telegram has just updated their Bit spec, and it's now possible to
    run/launch a JavaScript app directly from the client.

    https://core.telegram.org/bots/samples

    Ah, bots. I thought you were talking about something completely different. (I'm not sure what "run/launch a JavaScript app directly from the client" means here; bots typically run standalone / implement the client themselves.)

    Off the top of my head, a few of the things that might fit with a bot integration might be - access to file areas
    - download of mail (like a QWK door)
    - a binkp like transfer of mail packets
    etc

    Using a bot as a mailer seems a bit janky to me, but I'm probably missing something. We've already got systems in place for moving packets around. Is the goal to use Telegram's network for mail transfers, eg. my bot exchanges mail with your bot, with each BBS/node running its own bot?

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    ---
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From John Dovey@4:920/69.1 to echicken on Friday, April 22, 2022 17:41:07

    Ah, bots. I thought you were talking about something completely different. (I'm not sure what "run/launch a JavaScript app directly from the client" means here; bots typically run standalone / implement the client themselves.)

    Yes, sorry. My sausage fingers typed bit instead of not.


    Off the top of my head, a few of the things that might fit with a bot
    integration might be - access to file areas
    - download of mail (like a QWK door)
    - a binkp like transfer of mail packets
    etc

    Using a bot as a mailer seems a bit janky to me, but I'm probably missing something. We've already got systems in place for moving packets around. Is the goal to use Telegram's network for mail transfers, eg. my bot exchanges mail with your bot, with each BBS/node running its own bot?

    That's what I was thinking.
    https://core.telegram.org/bots/webapps
    This is probably a better url than the one I shared before.
    I was thinking that just like the web interface allows access to the BBS using a web browser, it might be possible to do the same using the Telegram client

    This would do a number of things.
    Broaden the access (especially on mobile) to BB systems (especially on mobile) by making it possible on the devices and in the format that the modern users would find familiar.
    The app is already installed on millions of devices and being used, so this would then just be one more "contact" for them that happened to be a BBS.
    The Bot talks to "clients" by polling Telegram servers, so it should be possible for an SBBS installation to have a local bot to which many users could connect. The bot would simply provide an interface to services tbe BBS provides (echos, Netmail, file areas etc).
    One of the interesting things is that it would get around the problem I'm having with ENat... so more people could run it without having issues of people not being able to connect (telnet etc) to their boards
    This same advantage would apply to a binkp type bit which would also make the system accessible even behind a NAT or firewall.

    JD
    --- AfterShock/Android 1.6.8
    * Origin: Firecat Mobile (4:920/69.1)
  • From echicken@1:103/705 to John Dovey on Saturday, April 23, 2022 03:21:29
    Re: Telegram and JavaScript
    By: John Dovey to echicken on Fri Apr 22 2022 17:41:07

    https://core.telegram.org/bots/webapps
    This is probably a better url than the one I shared before.

    Yes, thanks for that. This is sort of like what I thought you were describing at first.

    I'm of two minds about this.

    On one hand, it's a neat idea. Your bot can launch a mini website inside the Telegram app and present whatever UI it likes. You're no longer constrained to a typical chatbot interaction (typing commands, etc.). There's no need for the user to log in, Telegram makes assertions about who they are. It "feels" like part of the app; you don't have to leave the app; it's better than typing a bunch of commands to a bot.

    On the other hand, the user could just go to a website instead, or we could have a mobile app. I'm not entirely sure what's being gained. Maybe a chatbot should just be a chatbot? I dunno. I'm sure my subconscious will ponder this for a while.

    for them that happened to be a BBS. The Bot talks to "clients" by polling Telegram servers, so it should be possible for an SBBS installation to have a local bot to which many users could connect. The bot would simply provide an interface to services tbe BBS provides (echos, Netmail, file areas etc). One of the interesting things is that it would get around the

    When I say "maybe a chatbot should just be a chatbot" I mean that typing questions/commands to it is the natural order of things, and interacting with it "should" be like having a chat. That said, typing a bunch of stuff on a mobile device is a miserable experience, so they're probably onto something here.

    I'll go off on a tangent now and talk about an (unoriginal) idea I had a few years ago for a Synchronet bot "stack". Essentially there would be low level messaging-protocol drivers (eg. IRC, Telegram, Discord, BBS message bases) and high level bot modules providing functionality. It'd be running on the BBS and have full access to BBS data. The user experience would be pretty much the same no matter which protocol they were interacting with the bot via. (Unfortunately that only works if the UI is chat-based, unlike these Telegram WebApps.) That'd be one way of exposing BBS data to users on some chat system, though.

    Other tangent: as cool as it might be to write the above, or simply create a Telegram bot that runs on Synchronet, it might be better to just create a proper web API for Synchronet. You could then write a bot using some existing bot framework, in your language of choice, and get data in and out of the BBS that way. This opens the door to many other possible integrations, and saves the work of writing a Telegram bot from scratch when it's already been done and done and done.

    Anyway, that's my rambling on this topic for the moment. I'll be thinking about it.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com
    ---
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From MRO@1:103/705 to echicken on Saturday, April 23, 2022 08:40:46
    Re: Telegram and JavaScript
    By: echicken to John Dovey on Fri Apr 22 2022 06:46 pm

    Re: Telegram and JavaScript
    By: John Dovey to echicken on Fri Apr 22 2022 10:35:16

    Telegram has just updated their Bit spec, and it's now possible to
    run/launch a JavaScript app directly from the client.

    https://core.telegram.org/bots/samples

    Ah, bots. I thought you were talking about something completely different. (I'm not sure what "run/launch a JavaScript app directly from the client" means here; bots typically run standalone / implement the client themselves.)

    Off the top of my head, a few of the things that might fit with a bot integration might be - access to file areas
    - download of mail (like a QWK door)
    - a binkp like transfer of mail packets
    etc

    Using a bot as a mailer seems a bit janky to me, but I'm probably missing something. We've already got systems in place for moving packets around. Is the goal to use Telegram's network for mail transfers, eg. my bot exchanges mail with your bot, with each BBS/node running its own bot?


    you guys might want to consider doing a relay bot for telgram.
    i have one 'teleirc' hooked up to my irc server and my telegram channel and it makes things more fun. if i post a video or image on telegram it's hosted on the server and it generates a link.
    voice msgs are in .oga format.
    ---
    þ Synchronet þ ::: BBSES.info - free BBS services :::
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)