chengjunyuan / pe

0 stars 0 forks source link

Mismatch between UG and Error Message for `Group` Telegram groups #6

Open chengjunyuan opened 4 months ago

chengjunyuan commented 4 months ago

In the UG, it is stated that a Telegram link only needs to begin with https://t.me.

image.png

However, the following command throws an error. Command used:

editgroup g/TUT12 tg/https://t.me.com

image.png

soc-pe-bot commented 4 months ago

Team's Response

Thanks for pointing out!

All we are saying in the UG is that a valid Telegram link begins with https://t.me. A "valid Telegram invite link" is more than just that and is followed with other a / + symbols/characters. Moreover, the error message being shown in the app accurately tells the user the underlying issue.

The Telegram link you have given is invalid and the program works as intended.

Hence, we believe that this is not a valid bug, which is why we would like to reject this issue.

Hope this clarifies your concern!

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: Hi, I went to take a closer look through your code base to see how exactly this is done.

Checking the validity of a Telegram link is first done at EditGroupCommandParser (or equivalent), where the string is passed to ParserUtil::parseLink for checking (https://github.com/AY2324S2-CS2103T-W10-4/tp/blob/master/src/main/java/seedu/address/logic/parser/EditGroupCommandParser.java).

Inside ParserUtil, we observe that the string for the link is first trimmed then checked by the Group::isValidLink method (https://github.com/AY2324S2-CS2103T-W10-4/tp/blob/master/src/main/java/seedu/address/logic/parser/ParserUtil.java).

Finally in Group (https://github.com/AY2324S2-CS2103T-W10-4/tp/blob/master/src/main/java/seedu/address/model/group/Group.java), the Group::isValidLink method checks if the string matches the regex pattern "(https://t\\.me/[A-Za-z0-9_+-]+)?" to determine if it is a valid link.

To me, it appears that what the code does in reality is check if the string representing the link begins with https://t.me/, and is followed by letters, numbers, underscores, pluses, and minuses. It doesn't actually verify if the link is a link to a real Telegram group, and I personally wouldn't expect it to, since that is likely to be NotInScope.

In this case, I agree with your response that this is not a FunctionalityBug, but would perhaps then categorize it as a DocumentationBug, since now the UG should be updated to reflect the last backslash required for the Telegram link to function. Although you may consider this to be an adversarial input, it is also quite possible that a user chooses to manually type in the Telegram link for their group, potentially introducing typos to the Telegram link they input.