Skip to content

Commit

Permalink
Merge tag '1.11.0' into calref
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cburschka committed May 18, 2016
2 parents 269cb6f + c756e46 commit da0e65d
Show file tree
Hide file tree
Showing 33 changed files with 1,262 additions and 771 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,12 @@ js/lib/*.js
js/lib.js
js/core.js
css/global/all.css

# Installed files
img/emoticons/packs
config.custom.js
custom.css

# Project files
nbproject
.patch/
23 changes: 12 additions & 11 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ ifndef CP
CP=cp
endif

include ${SRC_PATH}/VERSION

VPATH = ${SRC_PATH}

CORE_FILES = js/core/strings.js js/core/chat.js js/core/xmpp.js \
js/core/ui.js js/core/visual.js js/core/config.js \
js/core/emoticons.js js/core/init.js
js/core/ui.js js/core/visual.js js/core/init.js \
js/core/config.js js/core/emoticons.js

LIB_FILES = js/lib/jquery.js js/lib/buzz.js js/lib/contextmenu.js \
js/lib/filesaver.js js/lib/jquery-ui.js js/lib/cookie.js \
Expand All @@ -35,6 +33,7 @@ ifeq (${MODE},minify)
CSS_FILES = css/global/all.min.css
endif
ifeq (${MODE},debug)
JS_FILES = ${CORE_FILES} ${LIB_FILES}
CSS_FILES = ${CSS_FILES_GLOBAL} css/global/import.css
endif

Expand All @@ -46,7 +45,9 @@ init:

clean:
rm -f index.html js/core/config.js js/core/emoticons.js js/*.js js/lib/*.js css/global/all.*
rmdir -p --ignore-fail-on-non-empty js/core/ js/lib/ css/global/
for dir in "js/core/ js/lib/ css/global/"; do\
if [ -d "$$dir" ]; then rmdir --ignore-fail-on-non-empty $$dir; fi;\
done

distclean: clean
rm .config.vars
Expand Down Expand Up @@ -89,18 +90,18 @@ install-css-global: ${CSS_FILES}
mkdir -p "${CDN_PREFIX}/css/global"
$(CP) -au $^ "${CDN_PREFIX}/css/global/"

templates:
js/core/config.js: js/core/config.tpl.js .config.vars
VERSION=${VERSION}
if [ -d "${SRC_PATH}/.git" ]; then \
VERSION=`git --git-dir ${SRC_PATH}/.git describe --always`; \
fi; \
"${SRC_PATH}/setup.py" $$VERSION
"${SRC_PATH}/setup.py" $@ $$VERSION

index.html: index.tpl.html js/core/config.tpl.js .config.vars
make templates
index.html: index.tpl.html .config.vars
"${SRC_PATH}/setup.py" $@

js/core/config.js: index.html .config.vars
js/core/emoticons.js: index.html .config.vars
js/core/emoticons.js: $(wildcard emoticon-packs/*/emoticons.conf) .config.vars
"${SRC_PATH}/setup.py" $@

js/lib/buzz.js: js/lib/buzz/src/buzz.js
$(CP) $^ $@
Expand Down
65 changes: 41 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ powered by strophe.js.
Requirements
------------

* An XMPP server with the Multi-User Chat and HTTP-BOSH extensions
is required to use cadence.
* An XMPP server with Multi-User Chat and either BOSH or WebSocket
support is required to run cadence.
* Python 2.7+ (or 3+) and GNU Make are required in the build process.
* Optional JS and CSS compression uses the YUI Compressor utility.
Install it using your distribution's package manager or download
Expand All @@ -27,9 +27,13 @@ These arguments are supported:

```
-h, --help show this help message and exit
-s, --https Generate HTTPS URLs
-s, --secure Generate HTTPS or Secure WebSocket URLs
--domain DOMAIN XMPP domain to log in on.
--bosh BOSH BOSH URL to connect to [http(s)://DOMAIN:528(0|1)/http-bind]
--url URL BOSH or WebSocket URL to connect to [PROTOCOL://HOST:PORT/PATH]
--protocol The protocol to connect through [http, https, ws, wss].
--host The host to connect to, if it differs from the XMPP domain [DOMAIN]
--port The port to connect to [5280, 5281].
--path The socket path on the server to connect to [/http-bind or /websocket].
--session-auth AUTH The URL to use for session authentication.
--muc MUC The MUC conference server to connect to. [conference.DOMAIN]
--chatbot CHATBOT The displayed name of the virtual ChatBot. ["Info"]
Expand All @@ -43,7 +47,7 @@ These arguments are supported:
Whether to optimize JS/CSS files ["minify"]
```

* Only `--domain` is strictly required. `--muc` and `--bosh` are required if
* Only `--domain` is strictly required. `--muc` and `--url` are required if
they differ from the default values.

* `--session-auth` is required if you would like to hook into an existing site's login
Expand Down Expand Up @@ -82,23 +86,31 @@ Instead, the installer places a file named `config.custom.js` into the install d
along with your index.html file. Add any configuration changes to this file
by assigning or deleting keys in the global `config` object.


License
-------

Copyright (c) 2014 Christoph Burschka <[email protected]>
The MIT License (MIT)

Copyright (c) 2014-2015 Christoph Burschka

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

Basis
-----
Expand All @@ -115,22 +127,27 @@ The following libraries are used without modifications in this project.
These libraries are not included, but are downloaded automatically
during the build process.

* strophejs (Collecta Inc.): https://github.com/strophe/strophejs
(MIT, with BSD and public domain parts)
* Strophe.js (Collecta Inc.): http://strophe.im/strophejs/
(MIT)

* jquery (jQuery Foundation): https://github.com/jquery/jquery
* jQuery (jQuery Foundation): https://jquery.com/
(MIT)

* momentjs: http://momentjs.com/ (MIT)
* jQuery UI (jQuery Foundation): https://jqueryui.com/

* Moment.js: http://momentjs.com/ (MIT)

* js-cookie (Klaus Hartl): https://github.com/js-cookie/js-cookie
* JavaScript Cookie (Klaus Hartl): https://github.com/js-cookie/js-cookie
(MIT)

* buzz (Jay Salvat): https://github.com/jaysalvat/buzz
* Buzz (Jay Salvat): https://github.com/jaysalvat/buzz
(MIT)

* FileSaver.js (Eli Grey): https://github.com/eligrey/FileSaver.js
(MIT/X11)
(MIT)

* jQuery replaceText (Christoph Burschka): https://github.com/cburschka/jquery-replacetext
(MIT)

* xbbcode.js (Christoph Burschka): https://github.com/cburschka/xbbcode.js
(GPL v2+)
(MIT)
85 changes: 85 additions & 0 deletions RELEASE-NOTES
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
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
--------

- #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.
- #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
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=1.10.0-calref
VERSION=1.11.0-calref
51 changes: 38 additions & 13 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import subprocess

def main():
args = parser().parse_args()
args.protocol = 'http' + (args.https and 's' or '')
port = str(5280 + args.https)
args.protocol = args.protocol or ((args.websocket and 'ws' or 'http') + (args.secure and 's' or ''))
args.host = args.host or args.domain
args.path = args.path or (args.websocket and '/websocket' or '/http-bind')
args.port = args.port or str(5280 + args.secure)

args.muc = args.muc or 'conference.' + args.domain
args.bosh = args.bosh or args.protocol + '://' + args.domain + ':' + port + '/http-bind/'
args.url = args.url or args.protocol + '://' + args.host + ':' + args.port + args.path
args.cdn_prefix = args.cdn_prefix or args.prefix
args.prefix = args.prefix.rstrip('/')
args.cdn_prefix = args.cdn_prefix.rstrip('/')
Expand All @@ -19,9 +21,9 @@ def main():
args.src_path = os.path.dirname(__file__) or '.'
shutil.copy(os.path.realpath(args.src_path) + '/Makefile.in', os.getcwd() + '/Makefile')

args.packs = ' '.join(folder for folder in os.listdir(args.src_path + '/emoticon-packs')
if os.path.isfile(args.src_path + '/emoticon-packs/' + folder + '/emoticons.conf'))

if args.packs == 'auto':
args.packs = ' '.join(folder for folder in os.listdir(args.src_path + '/emoticon-packs')
if os.path.isfile(args.src_path + '/emoticon-packs/' + folder + '/emoticons.conf'))

args.css_alt = ' '.join(sorted([x[:-4] for x in os.listdir(args.src_path + '/css/alt/') if x[-4:] == '.css']))

Expand All @@ -33,8 +35,7 @@ def main():

open('.config.vars', 'w+').write(
'''TITLE={title}
PROTOCOL={protocol}
XMPP_BOSH={bosh}
XMPP_URL={url}
XMPP_DOMAIN={domain}
XMPP_MUC={muc}
XMPP_SESSION_AUTH={session_auth}
Expand All @@ -58,16 +59,36 @@ def parser():
'''
)
parser.add_argument(
'-s', '--https', action='store_const',
help='Generate HTTPS URLs', dest='https', const=True, default=False
'-s', '--secure', '--https', action='store_const',
help='Generate secure URLs (append "s" and increment port number)', dest='secure', const=True, default=False
)
parser.add_argument(
'-ws', '--websocket', action='store_const',
help='Use websocket instead of BOSH', dest='websocket', const=True, default=False
)
parser.add_argument(
'--domain', type=str,
help='XMPP domain to log in on.', dest='domain', metavar='DOMAIN', required=True
)
parser.add_argument(
'--bosh', type=str,
help='BOSH URL to connect to\n[http(s)://DOMAIN:(5280|5281)/http-bind]', metavar='BOSH', dest='bosh', default=''
'--protocol', type=str,
help='Protocol\n[(ws|http)s?]', dest='protocol', metavar='PROTOCOL', default=''
)
parser.add_argument(
'--host', type=str,
help='Hostname\n[DOMAIN]', dest='host', metavar='HOST', default=''
)
parser.add_argument(
'--port', type=str,
help='Port\n[5280|5281]', dest='port', metavar='PORT', default=''
)
parser.add_argument(
'--path', type=str,
help='Path\n[/http-bind|/websocket]', dest='path', metavar='PATH', default=''
)
parser.add_argument(
'--url', '--bosh', type=str,
help='Socket URL to connect to [PROTOCOL://HOST:PORT/PATH]', metavar='URL', dest='url', default=''
)
parser.add_argument(
'--session-auth', type=str,
Expand All @@ -79,12 +100,16 @@ def parser():
)
parser.add_argument(
'--chatbot', type=str,
help='The displayed name of the virtual ChatBot. ["Info"]', metavar='CHATBOT', dest='chatbot', default='Info'
help='Attribute status messages to a virtual chatbot. []', metavar='CHATBOT', dest='chatbot', default=''
)
parser.add_argument(
'--title', type=str,
help='The page title. ["cadence"]', metavar='TITLE', dest='title', default='cadence'
)
parser.add_argument(
'--packs', type=str,
help='Emoticon packs (must be inside emoticon-packs/) ["auto"].', metavar='PACKS', dest='packs', default='auto'
)
parser.add_argument(
'--cdn-url', type=str,
help='Base URL for resources.', metavar='CDN_URL', dest='cdn_url', default=''
Expand Down
Loading

0 comments on commit da0e65d

Please sign in to comment.