Add msg and nick commands for XMPP MUCs

RESOLVED FIXED in Instantbird 43

Status

Chat Core
XMPP
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: abdelrhman, Assigned: abdelrhman)

Tracking

trunk
Instantbird 43

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

2 years ago
Add msg and nick commands for XMPP MUCs
check XEP-0045 [1].
 
[1] http://xmpp.org/extensions/xep-0045.html#impl-client-irc
(Assignee)

Updated

2 years ago
Assignee: nobody → a.ahmed1026
Blocks: 1172354
(Assignee)

Comment 1

2 years ago
Created attachment 8660364 [details] [diff] [review]
rev 1 - msg and nick commands
Attachment #8660364 - Flags: review?(aleth)
(Assignee)

Comment 2

2 years ago
Created attachment 8660948 [details] [diff] [review]
rev 2 - msg and nick commands

Per bug 1083458, Expression closures will be removed.
I handled that in this patch for nick, msg, ban and kick commands.
Attachment #8660364 - Attachment is obsolete: true
Attachment #8660364 - Flags: review?(aleth)
Attachment #8660948 - Flags: review?(aleth)

Comment 3

2 years ago
Comment on attachment 8660364 [details] [diff] [review]
rev 1 - msg and nick commands

Review of attachment 8660364 [details] [diff] [review]:
-----------------------------------------------------------------

Just a few nits!

::: chat/locales/en-US/xmpp.properties
@@ +72,5 @@
>  conversation.error.banCommandAnonymousRoom=You can't ban participants from anonymous rooms. Try /kick instead.
>  conversation.error.banKickCommandNotAllowed=You don't have the required privileges to remove this participant from the room.
>  conversation.error.banKickCommandConflict=Sorry, you can't remove yourself from the room.
> +conversation.error.changeNickFailedConflict=Could not change your nick to %S as this nick is already in use.
> +conversation.error.changeNickFailedNotAcceptable=Could not change your nick to %S as nicks are locked down in the room.

..."in this room."

::: chat/protocols/xmpp/xmpp.jsm
@@ +500,5 @@
> +      let message = _("conversation.error.changeNickFailedNotAcceptable",
> +                      aNewNick);
> +      this.writeMessage(this.name, message, {system: true, error: true});
> +      // TODO: We should then discover user's reserved nickname.
> +      // XEP-0045 (7.12): Discovering Reserved Room Nickname.

This probably also applies when joining a room?

@@ +505,5 @@
> +      return true;
> +    };
> +    let conflict = (aError) => {
> +      // XEP-0045 (7.2.9): Nickname Conflict.
> +      this.WARN(aError)

This is probably still here from debugging?

@@ +519,5 @@
> +    this._account.sendStanza(s, errorHandler);
> +  },
> +
> +  // Sends a private message to participant in MUC conversation.
> +  msg: function(aNickName, aMsg) {

You can inline this in the command in xmpp-commands, I don't think anything else will ever call it.

@@ +521,5 @@
> +
> +  // Sends a private message to participant in MUC conversation.
> +  msg: function(aNickName, aMsg) {
> +    if (!this._participants.has(aNickName))
> +      return;

Please add a system message so the user doesn't wonder what happened if he made a typo.
Attachment #8660364 - Attachment is obsolete: false
(Assignee)

Comment 4

2 years ago
Created attachment 8661419 [details] [diff] [review]
rev 3 - msg and nick commands

(In reply to aleth [:aleth] from comment #3)
> This probably also applies when joining a room?
Yes, I added that in the comment.

> This is probably still here from debugging?
Yes, I removed that in this patch.
Attachment #8660364 - Attachment is obsolete: true
Attachment #8660948 - Attachment is obsolete: true
Attachment #8660948 - Flags: review?(aleth)
Attachment #8661419 - Flags: review?(aleth)

Comment 5

2 years ago
Comment on attachment 8661419 [details] [diff] [review]
rev 3 - msg and nick commands

Review of attachment 8661419 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Attachment #8661419 - Flags: review?(aleth) → review+

Updated

2 years ago
Keywords: checkin-needed

Comment 6

2 years ago
https://hg.mozilla.org/comm-central/rev/86e09bc546066998e1744526556112a0f4c4873e
Bug 1204273 - Implement nick and msg commands for XMPP muc. r=aleth

Updated

2 years ago
Status: NEW → RESOLVED
Last Resolved: 2 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Instantbird 43
You need to log in before you can comment on or make changes to this bug.