Commit Graph

91 Commits

Author SHA1 Message Date
JC Brand
be122af3ed Add tests for rendering of error messages. 2016-06-23 08:56:15 +02:00
JC Brand
705c043852 Fixes concerning tab visibility 2016-06-17 09:30:47 +00:00
JC Brand
62c170273e Allow plugins to have optional dependencies.
This change refactors out the plugin code from converse-core into
src/converse-puggable.js

Additionally, plugins now have an optional attribute `optional_dependencies`
which is an array of dependencies which are "nice-to-have" but not essential.

Work has also been done to ensure that a plugins' dependencies are first loaded
before the plugin itself.
2016-06-10 08:26:29 +00:00
JC Brand
a050015e61 Add processing hints to chat state notifications
So that they're not stored in MAM.
2016-05-30 16:53:31 +00:00
JC Brand
bd23a7751a Add processing hints to OTR messages
so that they're not stored in MAM and not forwarded.

updates #553
2016-05-30 16:52:26 +00:00
JC Brand
b6fcc9b79d Don't render unescaped urls. 2016-05-28 11:28:32 +00:00
JC Brand
5a1b308edd Render images from URLs 2016-05-28 11:13:49 +00:00
JC Brand
c738d085c4 Indicate to the user when there are unread messages
further down in the chat box.
2016-05-28 10:07:11 +00:00
JC Brand
82ee7f694e Don't ignore messages sent to different resource
But make this behavior configurable. Updates #647
2016-05-28 06:36:24 +00:00
JC Brand
aaaacf2513 Also show the day for the first received messages.
Until now, new days were only indicated for messages received on different days
*after* the day's messages.
2016-05-25 06:24:42 +00:00
JC Brand
4c6bd1f49c Cleaner separation between minimize/trimming feature and core
One visible effect is that when this component is now removed,
minimize buttons are not visible on the chat boxes.

updates #622
2016-03-31 08:40:25 +00:00
JC Brand
f353fe8611 Bugfix for headline messages.
Couldn't handle messages with no "from" attribute.
Some refactoring to add code that checks if a messages is a headline to the
utils module.
Updated tests. Add sinon so that we can test returned value of spy.
2016-03-28 10:51:32 +00:00
Viktor Liu
eec2a4f5e9 Fix tests for #609 2016-03-23 23:27:25 +01:00
JC Brand
bf9929b1e3 Fix failing tests after adding rel="noopener" 2016-03-16 09:06:44 +00:00
JC Brand
0746f2aa68 Fix failing tests. 2016-03-09 11:16:15 +00:00
JC Brand
da0c858fe0 Used debounce ineffectually. Fixed now.
The ChatBox.show() method was being called for every invocation, 100ms after
the fact, instead of it being called only once.

Fixed that and also changed to call it at the start.
2016-02-16 07:47:16 +00:00
JC Brand
7ad3c385aa Rename chat-message-* class to chat-msg-* 2015-10-28 08:52:19 +00:00
JC Brand
ca2b40f79c More css refactoring. 2015-10-28 08:49:28 +00:00
JC Brand
e835a25184 Add jshint checking and fix errors. 2015-10-25 17:55:18 +00:00
Christoph
e20018961f Fix outgoing chat messages not having a msgid when being put into sessionStorage, fixes #467 2015-10-12 11:06:12 +02:00
JC Brand
e3cb6f3fc7 Use .bind instead of $.proxy 2015-10-07 09:05:53 +00:00
JC Brand
e8fba4a7d0 Refactored showNewDay to indicate day changes between messages.
updates #306
2015-07-19 13:43:26 +02:00
JC Brand
eae706690f Renamed some methods and added docstrings, for clarity. 2015-07-04 10:24:00 +02:00
JC Brand
6736a5bce4 Test carbons of user's own sent messages.
Found and fixed a bug in the process.
2015-07-03 11:55:13 +02:00
JC Brand
0afa7ec188 Don't carbon copy OTR messages. 2015-07-03 11:41:14 +02:00
JC Brand
0fdf28625b Add a test for forwarded carbon messages. 2015-07-03 11:36:30 +02:00
JC Brand
c2ccb2c693 New test and fixes to the message handler. updates #431 2015-07-02 11:23:52 +02:00
JC Brand
c745e1ebff Cherry-pick only those languages from Moment which we support in converse.js 2015-06-22 22:20:02 +02:00
JC Brand
5a488333ec Add a test and changelog entry for #359
updates #359
2015-04-04 11:25:50 +02:00
JC Brand
5ec7c67b50 Don't automatically show a chat box when creating it. updates #357
This caused a bug whereby a chat box would open only on chat state
notifications.

Also refactored the chats.open and chats.get methods so that they now reuse the
same map function and so that chats.get can now return any chat box and not
just already open ones.

Updated the tests to properly test this and updated the docs.
2015-04-02 02:01:53 +02:00
JC Brand
f283f6bce5 Fix failing tests after introducing AMD version of Strophe 2015-02-01 16:15:34 +01:00
JC Brand
607c2a81c9 Instead of GONE, set chat_state to INACTIVE when a box is closed.
Also, fixed all broken tests.
2015-01-09 10:48:36 +01:00
JC Brand
b4d53aaa94 Some refactoring of chat states work. updates #292
- Don't add a timeout for the GONE state.
- Change state to GONE when the user closes the chat box.
- Change the state to inactive when the user minimizes the chat box.
- Change the state to active when the users maximizes the chat box.
- Add more tests for chat states.
2015-01-09 09:09:49 +01:00
JC Brand
bb468ae0a3 Add better support for XEP-0085. closes #292
Converse.js will now send chat state notifications of <paused>, <inactive> and
<gone> when the user has stopped typing for 30 seconds, 2 minutes and 10 minutes
respectively.
2015-01-01 22:59:10 +01:00
JC Brand
55e32c735d Fix tests 2014-10-27 23:06:11 +01:00
JC Brand
4a89d28e38 Fix tests by depending on jquery obj.
Also fixed groupchat test by getting and including correct msg id.
2014-10-15 19:16:02 +02:00
JC Brand
297259fdb7 Remember toggle state of control box. updates #222 2014-09-22 13:08:56 +02:00
JC Brand
278c2c428d Add tests for the live filter functionality. updates #212 2014-08-18 22:39:24 +02:00
JC Brand
e7d563b34b Let tests pass again 2014-08-08 22:06:01 +02:00
JC Brand
33d84a0c8e Store roster on converse obj.
Storing it on the rosterview causes race conditions.
2014-08-03 23:05:36 +02:00
JC Brand
219d5c8a30 Major refactor.
The RosterView view is now an overview of RosterGroup objects.

RosterGroup objects each have their own collection of contacts which fall under that group.
Additionally, the RosterView has a collection of all contacts.

The comparator of RosterContacts is now used to correctly position roster
contacts and we therefore no longer need to explicitly sort them afterwards.

updates #83
updates #151
2014-08-02 19:31:53 +02:00
JC Brand
2b927f21be Big refactor. The RosterView is no longer an overview.
This is because we can no longer assume a one to one mapping between roster
contacts and their views. Roster contacts can belong to more than one group,
each group needs to show the contact, which means we need a view for each group
the contact belongs to.

updates #83
2014-08-01 21:31:21 +02:00
JC Brand
04d2b3aefd Some initial refactoring to support roster groups. updates #83
Made sure that the non-group usecase is still covered.
2014-07-19 23:45:21 +02:00
JC Brand
df91f17894 Fix tests. Emitted events weren't yet renamed in the tests. 2014-07-14 23:29:08 +02:00
JC Brand
38b26784b6 trimmed views are minimized by default 2014-07-06 11:00:43 +02:00
JC Brand
c25f33b181 Add proper separation between controlbox tests 2014-07-04 21:18:28 +02:00
JC Brand
5034ae33f2 Work on getting proper separation between tests. 2014-06-30 20:26:45 +02:00
JC Brand
4950bb9120 Fixing tests after latest refactoring 2014-06-30 19:21:16 +02:00
JC Brand
75a94fb2b7 Merge branch 'master' of https://github.com/derek-wangpch/converse.js into derek-wangpch-master 2014-06-30 18:59:49 +02:00
JC Brand
180d175e54 Fix tests. Make sure the min chats toggle gets updated 2014-06-29 18:30:01 +02:00