Open Bug 1225468 Opened 9 years ago Updated 2 years ago

Characters are miscounted for action messages

Categories

(Chat Core :: IRC, defect)

defect

Tracking

(Not tracked)

People

(Reporter: florian, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

I sent a long '/me blah blah' message in an IRC channel, and the message got cut, resulting in the other participants seeing 'ACTION <beginning of the message>'.
Assignee: nobody → pavankarthikboddeda
Attached patch v1.patch (obsolete) (deleted) — Splinter Review
This works, but I dont know if its a good way. Initially I thought of handling this in getMaxMessageLength() or sendTyping() in irc.js Let me know what you think.
Attachment #8829097 - Flags: review?(florian)
Attachment #8829097 - Flags: review?(clokep)
Comment on attachment 8829097 [details] [diff] [review] v1.patch Including IRC specific things outside of the IRC code doesn't seem good to me. Also, coding style: spaces around the '-' operator.
Attachment #8829097 - Flags: review?(florian)
Comment on attachment 8829097 [details] [diff] [review] v1.patch Review of attachment 8829097 [details] [diff] [review]: ----------------------------------------------------------------- As Florian said, this can't exist outside the IRC code.
Attachment #8829097 - Flags: review?(clokep) → review-
Attached patch v2.patch (obsolete) (deleted) — Splinter Review
Attachment #8829097 - Attachment is obsolete: true
Attachment #8829168 - Flags: review?(florian)
Attachment #8829168 - Flags: review?(clokep)
I wonder if it would make sense to expand the command handlers to handle this? I can think of other commands besides just /me which actually have special behavior, e.g. /topic (the topic has a different maximum length). Also, it seems like /kick, etc. could use this too.
Summary: Characters are mis counted for action messages → Characters are miscounted for action messages
Attachment #8829168 - Flags: review?(florian)
Attachment #8829168 - Flags: review?(clokep)
Attachment #8829168 - Flags: feedback+
Can you elaborate on what you mean by handling this in the command handlers? I am not sure what u mean by command handlers.
By "command handlers" I mean code that is related to the command, e.g. the stuff in ircCommands.jsm.
Hi Patrick, i dont see any scope of handling this in ircCommands, because the string being typed in conversation is sent as an argument to sendTyping() . So commands have to be handled in the sendTyping by 1.writing code in irc.js or 2.writing in ircCommands.jsm and exporting on more function from it. Tell me if you have something else in mind.
(In reply to Pavan Karthik [:matrixisreal] from comment #8) > Hi Patrick, > i dont see any scope of handling this in ircCommands, because the string > being typed in conversation is sent as an argument to sendTyping() . So > commands have to be handled in the sendTyping by > 1.writing code in irc.js or > 2.writing in ircCommands.jsm and exporting on more function from it. > Tell me if you have something else in mind. My thought was that before sending it to sendTyping we would check if the beginning matches a command, if it does we would check that command for a sendTyping function, if one exists we would use it, otherwise we would fallback to the standard sendTyping method. I'm not sure if this is a reasonable plan, however.
Attached patch v3.patch (deleted) — Splinter Review
Okay, had to touch a lot of files :P, Not sure if this is what you have asked. This is not a complete patch (wrote this in hurry). It just prints some error messages for two commands yet while typenotification. I'll proceed further if you this this way is good.=D
Attachment #8829168 - Attachment is obsolete: true
Attachment #8841665 - Flags: review?(clokep)
Comment on attachment 8841665 [details] [diff] [review] v3.patch Review of attachment 8841665 [details] [diff] [review]: ----------------------------------------------------------------- Overall this looks decent! I'm not 100% sure about the changes in conversation.xml (and obviously the changes in ircCommands.jsm are placeholders), but this is the general changes I was going for! Good job. :)
Attachment #8841665 - Flags: review?(clokep) → feedback+
Assignee: pavankarthikboddeda → nobody
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: