Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve/unify JID generation in XMPP. #292

Closed
cburschka opened this issue Dec 21, 2015 · 1 comment
Closed

Improve/unify JID generation in XMPP. #292

cburschka opened this issue Dec 21, 2015 · 1 comment
Assignees

Comments

@cburschka
Copy link
Owner

Several functions currently make some assumptions about recipients that aren't universal - they only accept a room/nick.

A more flexible approach would allow any of these:

  • {domain: example.com}: send directly to a custom domain.
  • {room: lounge}: send to lounge@mucdomain.
  • {nick: nick}: send to "nick" in the current room.
  • {room: room, nick: nick} send to room@mucdomain/nick
  • undefined: send to the current room.
  • {}: send to domain.
  • {node: node}: send to node@domain.
  • {node: node, domain: domain}: send to node@domain.
  • {node: node, resource: resource}: send to node@domain/resource.
  • {jid: ...} send to a JID that is already constructed.
@cburschka cburschka self-assigned this Dec 21, 2015
@cburschka cburschka changed the title Improve xmpp.iq() Improve/unify JID generation in XMPP. Dec 21, 2015
cburschka added a commit that referenced this issue Dec 21, 2015
xmpp functions that take a target now expect an object
instead of a variety of different argument styles.

The object will be passed to xmpp.jid().
(xmpp.jid has been renamed to xmpp.currentJid.)
xmpp.jid() makes some intelligent guesses on what defaults
to use for the given arguments, and returns a JID.
cburschka added a commit that referenced this issue Dec 22, 2015
The number of calls with a null item slightly outweighs the
ones with a null target - also, this order is more natural.

{room: null} will now target the MUC service instead of the main server.
cburschka added a commit that referenced this issue Dec 22, 2015
That function is only called once in the code, and
no type argument is given.
cburschka added a commit that referenced this issue Dec 22, 2015
xmpp.announce() is a one-liner only called once. Destroy.
xmpp.presence() is a wrapper for xmpp.pres(), which is a wrapper for $pres.
Remove and give xmpp.pres() optional arguments instead.
cburschka added a commit that referenced this issue Dec 23, 2015
Order iq, msg and pres, improve some indentation and comments.
cburschka added a commit that referenced this issue Dec 23, 2015
The number of calls with a null item slightly outweighs the
ones with a null target - also, this order is more natural.

{room: null} will now target the MUC service instead of the main server.
cburschka added a commit that referenced this issue Dec 23, 2015
That function is only called once in the code, and
no type argument is given.
cburschka added a commit that referenced this issue Dec 23, 2015
xmpp.announce() is a one-liner only called once. Destroy.
xmpp.presence() is a wrapper for xmpp.pres(), which is a wrapper for $pres.
Remove and give xmpp.pres() optional arguments instead.
cburschka added a commit that referenced this issue Dec 23, 2015
Order iq, msg and pres, improve some indentation and comments.
@cburschka cburschka added this to the 1.11.0 milestone Dec 23, 2015
cburschka added a commit that referenced this issue Dec 23, 2015
Doc comments, as well as an outdated jid:null definition
that should be currentJid:null.
cburschka added a commit that referenced this issue Dec 23, 2015
When only a nick is given, the target defaults to the current room
but still sends to the domain because target.room is undefined.
The MUC service should be used if either "room" or "nick" are given.
@cburschka
Copy link
Owner Author

A call to getBareJidFromJid was accidentally replaced with getBareJid. This makes /unban unusable.

@cburschka cburschka reopened this Dec 28, 2015
cburschka added a commit that referenced this issue Dec 28, 2015
Accidentally calling a non-existent strophe function.
cburschka added a commit to calref/cadence that referenced this issue May 18, 2016
1.11.0 - Nightmare
==================

This release fixes a long list of bugs, adds support for several XMPP features,
improves markup rendering in the interface, and adds eleven new ponicons.

Features
--------

- cburschka#283: Added eleven new ponicons: Three for Spitfire (:halp:, :sfsmile:,
        :sfwtf:) and eight for Vinyl Scratch (:vsbeam:, :vsblush:, :vscry:,
        :vsdrunk:, :vsfacehoof:, :vsgrin:, :vssmug:, :vswhoa:) and some aliases.
- cburschka#286: Show room ID in hover text.
- cburschka#287: Added markup (context menus, flairs, etc.) to JIDs.
- cburschka#289: Smarter URL parsing, allowing closing parentheses at the end of URLs.
- cburschka#290: Added XEP-0202 (Entity Time) support for incoming queries.
- cburschka#291: Added XEP-0030 (Service Discovery) support for incoming queries.
- cburschka#303: Added support for /ping <nick> and /ping without arguments
- cburschka#304: Added XEP-0092 (Software Version) support for incoming queries.
- cburschka#305: Added support for /version <nick|jid>.
- cburschka#314: Added XEP-0224 (Attention) support for incoming messages.
- cburschka#317: Added XEP-0115 (Entity Capabilities) support.
- cburschka#320: Added websocket support in ./configure and README
- cburschka#324: Added a visual.format.button() renderer.
- cburschka#336: Added support for an offline welcome message.
- cburschka#343: Allow explicitly choosing emoticon packs with ./configure --packs
- cburschka#349: Attributing internal messages to a "bot" is now optional (default: off).

Major changes
-------------

- cburschka#234: Rewrote text formatting to use DOM objects.
- cburschka#292: Rewrote target JID generation, add xmpp.jid() function.
- cburschka#307: Remove translateable strings from static markup, load them dynamically.
- Switched cadence to the MIT license (formerly GPL3+).

Bugfixes
--------

- cburschka#285: Reversed logic so that internal messages are exempt from truncation.
- cburschka#293: Fixed several crashes from non-occupant messages (with undefined nicks)
- cburschka#294: Now encoding/decoding window.location.hash values.
- cburschka#295: Fixed off-by-one error in command autocompletion.
- cburschka#297: Fixed a bug that made ping/time support only work once.
- cburschka#299: When escaping forbidden markup elements, leave their contents intact.
- cburschka#300: Now wrapping HTML log output (/save html) in document tags.
- cburschka#301: Now escaping apostrophe characters as &apos; in format.plain()
- cburschka#302: Now only calling eventIQCallback on "get" type <iq>.
- cburschka#309: Blocked bare JID in /ping or /version
- cburschka#310: Added an error when sending messages to non-existant users or domains.
- cburschka#311: Stopped formatting invalid JIDs as JIDS in the error message.
- cburschka#313: Stopped showing message stanzas that have no <body>.
- cburschka#315: Fixed a crash from non-MUC offline message delivery.
- cburschka#316: Stopped autojoining an empty room with a "#" URL fragment.
- cburschka#318: Fixed a markup bug (from cburschka#234) in ui.notifyDesktop.
- cburschka#319: Improved desktop notifications for direct messages.
- cburschka#321: Fixed an undefined variable error in visual.formatText().
- cburschka#322: Now showing error messages if the MUC server is down.
- cburschka#330: Fixed a roster entry bug (resulting from cburschka#234).
- Fixed some old bugs in the XMPP disconnect functions.
- cburschka#331: Fixed a crash on servers that send <actor> with their kick/bans.
- cburschka#338: Converted destroy-confirmation message to string (resulting from cburschka#234).
- cburschka#339: Fixed translateable strings with markup (resulting from cburschka#234).
- cburschka#340: Now consistently accepting backslashed quotes in command arguments.
- cburschka#341: Now escaping all quotes in nicks in chat.prefixMsg().
- cburschka#342: Fixed a crash in XMPP forms with list-multi/text-multi fields.
- cburschka#357: /admin now correctly reports failure of commands.

Other changes
-------------

- The /ping timeout error now includes the unit (ms).
- Ignore custom.css and config.custom.js files.
- Add color to debug XMPP traffic. Incoming is blue, outgoing is red.
- cburschka#296: Switch data-time attribute from timestamp to ISO string.
- cburschka#298: Use hexadecimal \HEX escape sequences in JID classnames.
- cburschka#306: Remove strings.init(), move that stuff to xmpp.init().
- Split up setup.py tasks to avoid rebuilding too many files.
- cburschka#325: Register namespaces with Strophe.
- Alphabetize button label strings.
- Update library list in README
- Fixed some of the copyright/license information.
- cburschka#356: Upgraded jquery library from 2.1.4 to 2.2.3
cburschka added a commit to calref/cadence that referenced this issue May 18, 2016
1.11.0 - Nightmare
==================

This release fixes a long list of bugs, adds support for several XMPP features,
improves markup rendering in the interface, and adds eleven new ponicons.

Features
--------

- cburschka#283: Added eleven new ponicons: Three for Spitfire (:halp:, :sfsmile:,
        :sfwtf:) and eight for Vinyl Scratch (:vsbeam:, :vsblush:, :vscry:,
        :vsdrunk:, :vsfacehoof:, :vsgrin:, :vssmug:, :vswhoa:) and some aliases.
- cburschka#286: Show room ID in hover text.
- cburschka#287: Added markup (context menus, flairs, etc.) to JIDs.
- cburschka#289: Smarter URL parsing, allowing closing parentheses at the end of URLs.
- cburschka#290: Added XEP-0202 (Entity Time) support for incoming queries.
- cburschka#291: Added XEP-0030 (Service Discovery) support for incoming queries.
- cburschka#303: Added support for /ping <nick> and /ping without arguments
- cburschka#304: Added XEP-0092 (Software Version) support for incoming queries.
- cburschka#305: Added support for /version <nick|jid>.
- cburschka#314: Added XEP-0224 (Attention) support for incoming messages.
- cburschka#317: Added XEP-0115 (Entity Capabilities) support.
- cburschka#320: Added websocket support in ./configure and README
- cburschka#324: Added a visual.format.button() renderer.
- cburschka#336: Added support for an offline welcome message.
- cburschka#343: Allow explicitly choosing emoticon packs with ./configure --packs
- cburschka#349: Attributing internal messages to a "bot" is now optional (default: off).

Major changes
-------------

- cburschka#234: Rewrote text formatting to use DOM objects.
- cburschka#292: Rewrote target JID generation, add xmpp.jid() function.
- cburschka#307: Remove translateable strings from static markup, load them dynamically.
- Switched cadence to the MIT license (formerly GPL3+).

Bugfixes
--------

- cburschka#285: Reversed logic so that internal messages are exempt from truncation.
- cburschka#293: Fixed several crashes from non-occupant messages (with undefined nicks)
- cburschka#294: Now encoding/decoding window.location.hash values.
- cburschka#295: Fixed off-by-one error in command autocompletion.
- cburschka#297: Fixed a bug that made ping/time support only work once.
- cburschka#299: When escaping forbidden markup elements, leave their contents intact.
- cburschka#300: Now wrapping HTML log output (/save html) in document tags.
- cburschka#301: Now escaping apostrophe characters as &apos; in format.plain()
- cburschka#302: Now only calling eventIQCallback on "get" type <iq>.
- cburschka#309: Blocked bare JID in /ping or /version
- cburschka#310: Added an error when sending messages to non-existant users or domains.
- cburschka#311: Stopped formatting invalid JIDs as JIDS in the error message.
- cburschka#313: Stopped showing message stanzas that have no <body>.
- cburschka#315: Fixed a crash from non-MUC offline message delivery.
- cburschka#316: Stopped autojoining an empty room with a "#" URL fragment.
- cburschka#318: Fixed a markup bug (from cburschka#234) in ui.notifyDesktop.
- cburschka#319: Improved desktop notifications for direct messages.
- cburschka#321: Fixed an undefined variable error in visual.formatText().
- cburschka#322: Now showing error messages if the MUC server is down.
- cburschka#330: Fixed a roster entry bug (resulting from cburschka#234).
- Fixed some old bugs in the XMPP disconnect functions.
- cburschka#331: Fixed a crash on servers that send <actor> with their kick/bans.
- cburschka#338: Converted destroy-confirmation message to string (resulting from cburschka#234).
- cburschka#339: Fixed translateable strings with markup (resulting from cburschka#234).
- cburschka#340: Now consistently accepting backslashed quotes in command arguments.
- cburschka#341: Now escaping all quotes in nicks in chat.prefixMsg().
- cburschka#342: Fixed a crash in XMPP forms with list-multi/text-multi fields.
- cburschka#357: /admin now correctly reports failure of commands.

Other changes
-------------

- The /ping timeout error now includes the unit (ms).
- Ignore custom.css and config.custom.js files.
- Add color to debug XMPP traffic. Incoming is blue, outgoing is red.
- cburschka#296: Switch data-time attribute from timestamp to ISO string.
- cburschka#298: Use hexadecimal \HEX escape sequences in JID classnames.
- cburschka#306: Remove strings.init(), move that stuff to xmpp.init().
- Split up setup.py tasks to avoid rebuilding too many files.
- cburschka#325: Register namespaces with Strophe.
- Alphabetize button label strings.
- Update library list in README
- Fixed some of the copyright/license information.
- cburschka#356: Upgraded jquery library from 2.1.4 to 2.2.3
cburschka added a commit that referenced this issue May 19, 2016
1.11.0 - Nightmare (generic)
============================

This release fixes a long list of bugs, adds support for several XMPP features,
and improves markup rendering in the interface.

Features
--------

- #286: Show room ID in hover text.
- #287: Added markup (context menus, flairs, etc.) to JIDs.
- #289: Smarter URL parsing, allowing closing parentheses at the end of URLs.
- #290: Added XEP-0202 (Entity Time) support for incoming queries.
- #291: Added XEP-0030 (Service Discovery) support for incoming queries.
- #303: Added support for /ping <nick> and /ping without arguments
- #304: Added XEP-0092 (Software Version) support for incoming queries.
- #305: Added support for /version <nick|jid>.
- #314: Added XEP-0224 (Attention) support for incoming messages.
- #317: Added XEP-0115 (Entity Capabilities) support.
- #320: Added websocket support in ./configure and README
- #324: Added a visual.format.button() renderer.
- #336: Added support for an offline welcome message.
- #343: Allow explicitly choosing emoticon packs with ./configure --packs
- #349: Attributing internal messages to a "bot" is now optional (default: off).

Major changes
-------------

- #234: Rewrote text formatting to use DOM objects.
- #292: Rewrote target JID generation, add xmpp.jid() function.
- #307: Remove translateable strings from static markup, load them dynamically.
- Switched cadence to the MIT license (formerly GPL3+).

Bugfixes
--------

- #285: Reversed logic so that internal messages are exempt from truncation.
- #293: Fixed several crashes from non-occupant messages (with undefined nicks)
- #294: Now encoding/decoding window.location.hash values.
- #295: Fixed off-by-one error in command autocompletion.
- #297: Fixed a bug that made ping/time support only work once.
- #299: When escaping forbidden markup elements, leave their contents intact.
- #300: Now wrapping HTML log output (/save html) in document tags.
- #301: Now escaping apostrophe characters as &apos; in format.plain()
- #302: Now only calling eventIQCallback on "get" type <iq>.
- #309: Blocked bare JID in /ping or /version
- #310: Added an error when sending messages to non-existant users or domains.
- #311: Stopped formatting invalid JIDs as JIDS in the error message.
- #313: Stopped showing message stanzas that have no <body>.
- #315: Fixed a crash from non-MUC offline message delivery.
- #316: Stopped autojoining an empty room with a "#" URL fragment.
- #318: Fixed a markup bug (from #234) in ui.notifyDesktop.
- #319: Improved desktop notifications for direct messages.
- #321: Fixed an undefined variable error in visual.formatText().
- #322: Now showing error messages if the MUC server is down.
- #330: Fixed a roster entry bug (resulting from #234).
- Fixed some old bugs in the XMPP disconnect functions.
- #331: Fixed a crash on servers that send <actor> with their kick/bans.
- #338: Converted destroy-confirmation message to string (resulting from #234).
- #339: Fixed translateable strings with markup (resulting from #234).
- #340: Now consistently accepting backslashed quotes in command arguments.
- #341: Now escaping all quotes in nicks in chat.prefixMsg().
- #342: Fixed a crash in XMPP forms with list-multi/text-multi fields.
- #357: /admin now correctly reports failure of commands.

Other changes
-------------

- The /ping timeout error now includes the unit (ms).
- Ignore custom.css and config.custom.js files.
- Add color to debug XMPP traffic. Incoming is blue, outgoing is red.
- #296: Switch data-time attribute from timestamp to ISO string.
- #298: Use hexadecimal \HEX escape sequences in JID classnames.
- #306: Remove strings.init(), move that stuff to xmpp.init().
- Split up setup.py tasks to avoid rebuilding too many files.
- #325: Register namespaces with Strophe.
- Alphabetize button label strings.
- Update library list in README
- Fixed some of the copyright/license information.
- #350: Removed dash theme from the main branch.
- #356: Upgraded jquery library from 2.1.4 to 2.2.3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant