Code Monkey home page Code Monkey logo

Comments (14)

Tjzabel avatar Tjzabel commented on May 30, 2024 2

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.

Tjzabel avatar Tjzabel commented on May 30, 2024 2

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:

<T​jzabel> Initial text
<T​jzabel> [Re T​jzabel: Initial text] response text

If a message is over 15 characters long, then a "..." is appended after the 15th character.

from teleirc.

Tjzabel avatar Tjzabel commented on May 30, 2024 1

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.

jwflory avatar jwflory commented on May 30, 2024 1

@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.

jwflory avatar jwflory commented on May 30, 2024 1

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.

robbyoconnor avatar robbyoconnor commented on May 30, 2024 1

If a message is over 15 characters long, then a "..." is appended after the 15th character.

@Tjzabel that works!

from teleirc.

jwflory avatar jwflory commented on May 30, 2024

I see this issue as a UI/UX enhancement for two things:

  1. Place Telegram usernames between square brackets (which I forgot, we actually can do already – there are config values for username prefix/suffix)
  2. 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.

xforever1313 avatar xforever1313 commented on May 30, 2024

...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.

robbyoconnor avatar robbyoconnor commented on May 30, 2024

I have no opinions

from teleirc.

jwflory avatar jwflory commented on May 30, 2024

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.

jwflory avatar jwflory commented on May 30, 2024

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.

jwflory avatar jwflory commented on May 30, 2024

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.

Tjzabel avatar Tjzabel commented on May 30, 2024

Removing from 1.4 milestone due to re-scoping.

from teleirc.

brettgilio avatar brettgilio commented on May 30, 2024

What is the status on this?

from teleirc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.