Comments (14)
Update
Work has gone underway! Here's what's been done so far:
- Listener to
reply
events has been added TgReplyHandler.js
file has been created, and stubbed.
It is unknown when I will get around to actually completing this issue, but at least a head start has been made. I'm projecting an early-summer deadline.
from teleirc.
Welp, almost two years later this feature is finally getting completed. Currently, the reply quote type + length of reply is configurable, and looks like this by default:
<Tjzabel> Initial text
<Tjzabel> [Re Tjzabel: Initial text] response text
If a message is over 15 characters long, then a "..." is appended after the 15th character.
from teleirc.
Also, as an update to @xforever1313's comment, a reply message is indeed a Message object in itself, so a simple check just needs to be made to see if the reply_to_message
field exists within the Message object.
If it does, then we go into that message object, grab say, the first 20 characters, and prepend it to the main message. We should make the reply message length a config variable. After that, it's pretty straight forward!
from teleirc.
@Tjzabel Super, thanks for digging into this one. I saw your 51-TG-replies branch. We'll keep this on the horizon for v1.4. 👍
from teleirc.
Hi @brettgilio! We followed up in IRC already, but to add an update here, this is still something we would like to add to the bot. It is one of the most requested features. We are focused on delivering other core features before the end of 2020, so I do not expect we will get it before the end of this year. But I hope we can get it early in 2021.
from teleirc.
If a message is over 15 characters long, then a "..." is appended after the 15th character.
@Tjzabel that works!
from teleirc.
I see this issue as a UI/UX enhancement for two things:
- Place Telegram usernames between square brackets (which I forgot, we actually can do already – there are config values for username prefix/suffix)
- Quote a number of characters for messages from a replied message on Telegram and relay it over it IRC
I will update this accordingly.
Implementation ideas
Quoting messages should be a configurable options. If set to true, there should also be a configuration value for the number of characters for quoting messages. Assume a default of maybe 15 characters.
When configured accordingly, the messages appear like this:
<alick9188> @bexelbie You're living in China?
<bexelbie> 「Re alick9188: @bexelbi...」Nope. I’ll be in Beijing for LC3 though.
@robbyoconnor @repkam09 @thenaterhood @xforever1313 Do any of you have thoughts or opinions on this?
from teleirc.
...I swear we had a way in teleirc to determine if a message from telegram was a reply or not... Did I dream that 0_o? That would be step one.
Step two would be getting the message that was replied to. Its been a while since I looked at the Telegram Bot API... but I would assume it would include either the replied message as a string, a message object, or an ID on a message object. If its a string or message object, that's not too bad to grab, but an ID could get tricky as we'll have to make a second request to get the string of the message of that ID (or heaven forbid do caching).
The rest is straightforward, pre-pending the IRC message with the characters from the config, and making a substring of the message that was replied to.
Another thing to consider, we need to set an upper limit of the number of characters to quote. An IRC message can go up to 510 characters (512 if you count \r\n). Subtract 7 for "PRIVMSG", 50 for a worst-case Channel name, 3 for special IRC characters, 32 characters for the worst-case Telegram user name length, leaves 418 characters for an IRC message (for Chaskis, I actually round down to 400 for the maximum number of characters a message can have to be safe). 400 characters is pretty significant, so we can probably be generous with the upper limit of the number of characters to quote (like 50-100). A number of 0 could disable the feature. A negative number should raise a configuration error.
from teleirc.
I have no opinions
from teleirc.
Discussed in 2019-03-02 developer meeting.
This feature is accepted for the v1.4 release. @Tjzabel will work on this feature for this sprint. His next action item is to share a short write-up of how to approach this one before the next developer meeting on March 9th.
from teleirc.
Discussed in 2019-03-30 Teleirc developer meeting.
Since @Tjzabel is currently working on #130 this week, no further updates expected on this ticket until Saturday, April 6th.
from teleirc.
Discussed during 2019-04-06 developer meeting.
During the meeting, we took a realistic evaluation of work remaining for this sprint and what will make the next release. We changed our original plans of releasing v1.4 at the end of this month, and instead we're going for a smaller release, v1.3.1, with some of the other tasks.
This ticket will not be completed in the v1.3.1 sprint. It will remain on the v1.4 release milestone. Work on this release may not begin until August 2019.
from teleirc.
Removing from 1.4 milestone due to re-scoping.
from teleirc.
What is the status on this?
from teleirc.
Related Issues (20)
- Authorized... EOF... die HOT 5
- teleirc exits with code 0/success even on failure HOT 2
- Add an option for the bot to show the part/join messages for certain users
- Requires super-new glibc -- will not run on Debian HOT 4
- Spam prevention HOT 2
- ban evasion bug. user can pm the bot and send messages to irc without being in the group
- Add Arch Linux Mexico to the "Who uses TeleIRC?" page.
- RELAYMSG support when supported by the IRCd
- IRC ACTION statements do not appear on Telegram correctly
- Relay HOT 1
- Create unit tests for IRC action handler functionality
- teleirc's v2.2.0 does not provide a binary relase breaking the 'teleirc-bin' AUR package. HOT 3
- "SASL authentication failed" error message when attempting to connect to an IRC channel HOT 2
- SASL support to log into irc.libera.chat HOT 4
- teleirc shows the telegram nicknames in the Telegram with unneeded space HOT 2
- IRC Raw Log HOT 1
- IRC - TLS Client Certificates HOT 2
- IRC - Allow setting user modes HOT 2
- Cannot join registration-required channels HOT 3
- Relay announces own IRC join HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from teleirc.