Commit Graph

893 Commits

Author SHA1 Message Date
JC Brand
66386d5b25 Rely on "pagehide" first if it's available.
This is because "pagehide" is fired in more situations and because unload
is not supported on mobile Safari.
2015-06-19 18:00:22 +02:00
JC Brand
c47c8bd7eb Use "strict" mode again and fix styling.
We "use strict" outside of the function that gives issues on Safari.
2015-06-19 17:58:28 +02:00
JC Brand
9a2ed106c7 Bugfix. Don't reconnect when disconnect was due to auth err. 2015-06-07 18:29:36 +02:00
JC Brand
94514dfe1e Attempt to reconnect only after 5 seconds. 2015-06-07 18:26:32 +02:00
JC Brand
d6bb3f8502 Small changes to connection status handler.
* Rename onConnStatusChanged to onConnectStatusChanged
* Provide human readable debug feedback on onConnectStatusChanged
2015-06-07 18:23:29 +02:00
JC Brand
f86ef934e8 Refactor the session resumption code and fix a bug after recent merge.
Split the code into two new methods for the prebind and non-prebind
usecase.
2015-06-05 14:48:16 +02:00
JC Brand
085d91b546 Provide support for browsers which don't have beforeunload event. 2015-06-05 14:48:16 +02:00
JC Brand
334f095774 Merge branch 'master' into plugins-refactor 2015-06-04 12:11:56 +02:00
JC Brand
a77744d867 Two trimChats bugfixes. See below.
- TrimChats was called before a newly maximized chat had its final width which
  prevented it from working as intended.
- We cannot check for available space by using the width of the #conversejs
  element anymore, since it now has variable (auto) width. So we check against
  the body width instead.
2015-05-31 14:50:41 +02:00
JC Brand
f4edf75c72 Bugfix. Fetched chat boxes weren't being shown automatically. 2015-05-31 14:46:12 +02:00
JC Brand
bf61122805 Avoid trying to retrieve non-existing models. fixes #415 2015-05-31 14:39:28 +02:00
JC Brand
a412bd92c4 Merge branch 'MUC-toggle-Call' of https://github.com/thierrytiti/converse.js into thierrytiti-MUC-toggle-Call 2015-05-29 10:12:40 +02:00
JC Brand
66420962f7 Make sure the pong handler is always registered.
47e00ae005
2015-05-28 10:59:10 +02:00
thierrytiti
0745cdeaca toggleCall already inherits from ChatBoxView 2015-05-28 10:31:04 +02:00
JC Brand
47e00ae005 Various bugfixes.
- HAS_CSI might be called before features have been received. Instead, set a
  flag whenever a feature is received and check for that flag.
- Converse.ping was sending stanzas to the bare jid instead of to the domain.
- The handler that updates the date the last stanza was received must return
  true so that it gets called again.
- Only register the Pong handler if Ping is enabled.
- Rename lastMessage to lastStanzaDate to make it more clear.
2015-05-27 21:53:15 +02:00
JC Brand
e0a58efcfa Linting and code formatting.
Also use and add a Strophe namespace for CSI.
2015-05-27 21:49:12 +02:00
JC Brand
8e5d481e1c Merge branch 'auto-away' of https://github.com/thierrytiti/converse.js into thierrytiti-auto-away
Conflicts:
	converse.js
2015-05-27 20:01:22 +02:00
thierrytiti
fb589398ad XEP-0199: XMPP Ping
Use modified StropheJS ping plugin (AMD support)
Add Ping functionality
Add Pong handler

Fix to issue #144:
2015-05-27 18:14:58 +02:00
thierrytiti
24b204e8a4 Offline Pretty Status
add offline as possible case to enable translation
2015-05-26 18:36:17 +02:00
thierrytiti
7366bb709d MUC: missing toggle Call handler and function
the Call button is visible but no action is done
2015-05-26 16:39:06 +02:00
JC Brand
fc1768d12d Fixes #406.
Call to registerRosterXHandler and registerPresenceHandler on onReconnected give exception.
2015-05-21 17:04:56 +02:00
JC Brand
6afcc0fbe1 Bring lang detect code in line with coding style.
Change html files so that we auto-detect the lang now.
2015-05-20 19:31:59 +02:00
JC Brand
1d0ffe34ab Merge branch 'detect_lang' of https://github.com/thierrytiti/converse.js into thierrytiti-detect_lang 2015-05-20 19:20:17 +02:00
thierrytiti
a660f853c1 XEP-0352: Client State Indication
XEP-0352 support added to Auto Away Mode
2015-05-20 12:12:08 +02:00
JC Brand
6dcda4ad42 Ensure that roster contact's jids are bare 2015-05-18 11:42:29 +02:00
JC Brand
9db289df86 Bugfix. Automatic anonymous login didn't work if keepalive=false. 2015-05-16 16:28:23 +02:00
JC Brand
6260ba2864 Bugfix. Don't overwrite _super every time an override is made. 2015-05-16 16:27:51 +02:00
JC Brand
ea687d67f9 Merge branch 'master' into plugins-refactor 2015-05-15 14:48:12 +02:00
JC Brand
68bcc9d0eb Merge pull request #399 from thierrytiti/bugfixes
Bugfix. fullname is null
2015-05-15 14:41:18 +02:00
JC Brand
96df8dea97 Merge branch 'Placeholder-for-translation' of https://github.com/thierrytiti/converse.js into thierrytiti-Placeholder-for-translation
Conflicts:
	src/templates/toolbar.html
2015-05-15 14:39:02 +02:00
thierrytiti
7a359562ad Add placeholder for 'Insert a smiley' 2015-05-15 12:01:29 +02:00
JC Brand
3ea3ac52a3 Merge branch 'master' into plugins-refactor 2015-05-15 11:32:33 +02:00
thierrytiti
e64c19fc18 Bugfix. fullname is null
wrong callback argument mapping in XmppStatus initialize: fullname is
null
2015-05-15 11:05:26 +02:00
JC Brand
cd759a7174 Fixes around using bare jid for roster and chats.
- Make sure the bare jid is used as roster contact id.
- Save the resource when creating a new roster contact
- In getWrappedChatBox, get roster item by bare jid
- In getWrappedChatBox, make sure the chat box is created from bare jid
2015-05-15 00:33:23 +02:00
JC Brand
3fc0ef1e70 Remove snippet of code that's not being used. 2015-05-15 00:33:23 +02:00
thierrytiti
e35c5a4fa3 Indentation 2015-05-14 13:55:39 +02:00
thierrytiti
be102de031 Bugfix if auto_away=0 and auto_xa>0
In this case, it will force changing presence even if the user
specificly set another status.
2015-05-13 16:25:26 +02:00
thierrytiti
6034932523 Update converse.js 2015-05-13 13:57:22 +02:00
thierrytiti
d631af58a9 Automatic Away Mode
Add functions for changing user presence to ``away`` or ``xa``
2015-05-13 13:51:24 +02:00
thierrytiti
f521532f2f Language Detection
Replace default en language to autodetection if no i18n setting is set.
2015-05-11 17:36:12 +02:00
JC Brand
42437ffa91 Bind overridden methods to the plugin context 2015-05-10 17:15:15 +02:00
JC Brand
91638cabe1 Add support for "overrides" namespace convention in plugins. 2015-05-10 00:51:36 +02:00
Guillermo Bonvehí
70191eac00 Added login-panel placeholder and roster-item Name translations
This will allow to translate 'user@server' and 'password' in the login
screen and also in the roster-item tooltip, there's 'Name:' which can
now be translated
2015-05-08 14:08:09 -03:00
Guillermo Bonvehí
71ea60e44a Fixed an error that appears when unload event is triggered
This happens when you load a page with converse and do not login to
the chat. It can be tested in converse.org preserving logs while
navigating to another page.
Inside clearSession there's a call to roster which is not initalized
and also another one to controlbox.save which is not set so it fails
with an url error during sync.
2015-05-07 12:47:32 -03:00
JC Brand
c0bec459a0 Bugfix. See below.
Manual login doesn't work when websocket_url is set and not bosh_service_url

It's already a while since we don't include an input for the bosh_service_url in the login panel.
2015-05-06 16:46:37 +02:00
JC Brand
9f5f5da7ed Created method insertIntoPage
Put the code that inserts a chat box into the page in it's own method,
so that it can be overridden from a plugin.
2015-05-03 17:43:22 +02:00
JC Brand
d6a1dee2d2 Rename the placeholder for contact adding
to make it clearer what a JID should look like.
2015-05-02 00:21:11 +02:00
JC Brand
aa3de742c0 Merge branch 'master' into roster_refactor 2015-04-25 23:06:59 +02:00
JC Brand
d6038c7c7b Allow the URL to the sounds to be configurable.
Made some modifications to the code contributed by @thierrytiti and documented
the change.

Fixes #344
2015-04-25 22:41:29 +02:00
thierrytiti
310d2b77f3 typo 2015-04-25 22:26:10 +02:00