mazed-dev / truthsayer

Second brain for knowledge workers that retains everything you read online and helps you to back up your communication with your source as easily as you might share an anecdote over a coffee.
MIT License
2 stars 2 forks source link

support a channel to post automatic feedback to a user #116

Closed SergNikitin closed 2 years ago

SergNikitin commented 2 years ago

We want to have a way to send information to our users in cases like

SergNikitin commented 2 years ago

In theory users may prefer different ways of communication, from classic emails to something more modern like chat applications. Telegram bot will be our first stab at this since

  1. everyone who volunteered for customer interviews (and therefore is likely to become an early adopter) uses Telegram
  2. Telegram is easy to integrate with (especially compared to older tech like email webservers)
  3. We have longer-term plans for Telegram integration, including user-initiated actions like "add a doc node via sending a message to a bot", "provide feedback about Mazed through a bot" etc
SergNikitin commented 2 years ago

Looked into features of Telegram bots & their integration APIs. TLDR - great for "Share button" workflows we have planned, awkward at best for password recovery workflows.

The good

The bad

1. ill-suited for introductory experiences

As repeated througout the docs (for example, here),

Bots can't initiate conversations with users. A user must either add them to a group or send them a message first.

This means that functionality where a user didn't have a chance to start a conversation with our bot (like #118) will be less straightforward for the user - they won't instantly receive a message when they click "Register" in the Mazed UI. We'll be able to send them a message only after they

It won't help if they give us their Telegram ID in advance - Telegram will not allow a bot to contact a person that didn't explicitly say through TG UI that they want to be contacted.

2. ill-suited as a "stable" communication channel

As described in the previous section, bots can't always reach their recipient. If a user decided to delete their chat with the bot then

On top of that, Telegram itself doesn't have a built-in way to track "all users that opened a chat with a specific bot", so if we ever want to initiate an "unscheduled" message (like "here are the updates that we rolled out during past week") we'll have to persist the list of user IDs ourselves.

So Telegram bots

  1. are a weird tool for crucial identity management activities like "password recovery". It is unlikely that a user will completely brick their access to it since they can always re-add the bot back in Telegram, but conversations with bots are not viewed as "important" by Telegram users. I think it'll be a mess similar to "oh, have you checked the junk folder in your email?", but even more embarrassing
  2. require more implementation work to perform a duty of "news poster" - Telegram Channels are a better fit
SergNikitin commented 2 years ago

Briefly looked at email as the obvious alternative gorilla in the room and there is a good article on why running your own email server infrastructure is a dumb idea.

They do however suggest that just paying somebody else to do the heavylifting is relatively hassle-free. Fastmail, one of the offers from the article, charges $3 for a single account (and that includes 600 aliases, like auth@mazed.com, news@mazed.com etc). Not even sure if a paid one is needed at this point, the main perk seems to be "privacy" and a fancy domain name (instead of something like mazed-auth@gmail.com, mazed-help@gmail.com)

Programmatically, with a server up and running the rest seems easy and email providers give all the credentials for programmatic access it seems.

SergNikitin commented 2 years ago

For the reasons described above we have decided to postpone the telegram bot plans. We are likely to come back to them later as a way to submit more things to Mazed as new notes, but not to post feedback to a user.

For our immediate needs email is sufficient and has been integrated already in https://github.com/Thread-knowledge/smuggler/pull/56