Граф коммитов

449 Коммитов

Автор SHA1 Сообщение Дата
Daniel Calviño Sánchez 86f7c8f0f2 Remove unused attribute
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-08 20:59:41 +01:00
Daniel Calviño Sánchez cd0ccf4ae9
Remove outdated documentation
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-11-08 13:53:14 +01:00
Joas Schilling 10c847b0c5
Merge the email-invite into the new universal endpoint
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-11-06 17:29:05 +01:00
Joas Schilling ad06759f2e
Make the code more future proof and explicit
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-11-06 16:51:10 +01:00
Mario Danic 9c74620453
Add ability to invite groups
Fix a missing ,

Move to tabs
2018-11-06 16:20:35 +01:00
Joas Schilling d612e845f9
Better notifications for password shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-10-22 12:01:11 +02:00
Joas Schilling 3473a76276
Fix CSP also for guests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-10-15 16:05:10 +02:00
Daniel Calviño Sánchez 578448ab33 Override default CSP for now to allow JavaScript "eval"
By default in Nextcloud 15 the Content Security Policy prevents the use
of JavaScript "eval" function. This is used in several places in Talk,
so for now this restriction is lifted until the code is moved away from
"eval".

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-10-15 10:55:03 +02:00
Joas Schilling 0e592d0a83
Merge pull request #1229 from nextcloud/bugfix/1227/exception-on-too-long-chat-message
Handle exception on too long chat message gracefully
2018-10-09 14:47:19 +02:00
Joas Schilling c75d82525f
Do not throw when the guest has no name set
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-10-09 11:59:05 +02:00
Joas Schilling e3d985da60
Add an endpoint to set the notification level
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-10-08 15:26:45 +02:00
Joas Schilling 237126cc65
Adjust unit tests with the newest changes
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-10-05 10:58:43 +02:00
Joas Schilling 028b12e584
Always return the full message object on create
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-10-05 10:35:16 +02:00
Joas Schilling 3878b0c7f3
Catch the exception when the message is too long
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-10-05 10:35:16 +02:00
Joas Schilling 546526a89f
Merge pull request #1078 from nextcloud/feature/noid/guest-moderators-prework
Allow to make guests moderators
2018-10-05 10:32:36 +02:00
Joas Schilling 7e1de89fd8 Fix the system notifications for guest moderators
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-10-04 01:13:28 +02:00
Joas Schilling 6cff909ee4 Allow to make guests moderators
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-10-04 01:13:28 +02:00
Joas Schilling e4f6aae224
Fix bool logic for inCall flag
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-10-02 15:38:20 +02:00
Joachim Bauch 48a0c8ffcf
Allow calling "RoomController::formatLastMessage" without a current user.
This fails with the new type hinting which expects a "IUser" object.

Signed-off-by: Joachim Bauch <bauch@struktur.de>
2018-09-28 14:43:41 +02:00
Joas Schilling bc29961a79
Allow to invite email addresses
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-09-27 16:21:21 +02:00
Joas Schilling 5237f4299f
Introduce Chat\MessageParser which dispatches an event for all apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-09-27 15:18:43 +02:00
Joas Schilling bc9c2ea6c5
Refactor the lastMessage out
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-09-25 17:15:39 +02:00
Joas Schilling c9bc48608b
Make RoomController strict
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-09-25 17:01:42 +02:00
Ivan Sein 0fde8f789a Add missing 'systemMessage' attribute to room's lastMessage.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
2018-09-03 16:10:04 +02:00
Joas Schilling fbe6594342
Parse system messages correctly
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-08-27 14:06:27 +02:00
Joas Schilling 3b29c9c569
Send a push notification when a file was shared in a one to one room
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-08-27 12:29:37 +02:00
Joachim Bauch 1c1f91871e
Add "in-call-flags" capability, return flags from API and evaluate in UI.
Signed-off-by: Joachim Bauch <bauch@struktur.de>
2018-08-24 11:38:12 +02:00
Joas Schilling 73e4ba5485
Add a const for magic 0 as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-08-24 10:52:20 +02:00
Joachim Bauch adff1068d5
Rename flag for when user is in call.
Signed-off-by: Joachim Bauch <bauch@struktur.de>
2018-08-24 10:52:20 +02:00
Joachim Bauch d4929b7525
Change "inCall" state to contain bit flags
The flags encode if a user is in the call and whether he is publishing
audio and/or video.

Signed-off-by: Joachim Bauch <bauch@struktur.de>
2018-08-24 10:52:20 +02:00
Joas Schilling 135c82304f
Revert "Open the call in a new tab for now"
This reverts commit 112c73b71c.
2018-08-08 14:17:40 +02:00
Joas Schilling 112c73b71c Open the call in a new tab for now
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-08-08 10:24:49 +02:00
Joas Schilling f81f5e0a7c Do not reuse the room
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-08-08 10:24:49 +02:00
Joas Schilling 55a983fd9f Use the language of the owner for the room name
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-08-08 10:24:49 +02:00
Daniel Calviño Sánchez efc9d95b22 Send notification to the sharer that a password has been requested
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-08-08 10:24:49 +02:00
Daniel Calviño Sánchez 80705adbb2 Add end point to create rooms for requesting the password of a share
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-08-08 10:24:48 +02:00
Daniel Calviño Sánchez eb40ec1edc Add support for creating rooms associated to arbitrary objects
Associating a room to another object is optional; by default a room is
not associated to any object.

The association is just a "flag" on the room; any special behaviour for
an association must be implemented as needed outside the room (for
example, by responding to events emitted by the room).

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-08-08 10:24:48 +02:00
Joas Schilling f742037ff0
Fix the data type of the comment id
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-08-03 17:33:02 +02:00
Ivan Sein 8005b579bf
Merge pull request #1087 from nextcloud/bugfix/noid/dont-count-system-messages-to-unread
Don't count system messages to unread
2018-08-02 10:50:11 +02:00
Joas Schilling f452269332
Make sure the list of signaling messages is a JSON array
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-08-01 14:28:24 +02:00
Joas Schilling 36ae3a3e55
Highlight the unread count only for mentions
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-31 16:47:43 +02:00
Joas Schilling d69d88bcd4
Merge pull request #1085 from nextcloud/adjust-ui-to-layout-changes-in-server
Adjust UI to layout changes in server
2018-07-30 11:38:19 +02:00
Joas Schilling 02bc2a6ce7
Merge pull request #1084 from nextcloud/fix-1083
Fixes #1083
2018-07-30 08:40:24 +02:00
Mario Danic 523a547646 Fixes 1083
Signed-off-by: Mario Danic <mario@lovelyhq.com>
2018-07-30 00:18:17 +02:00
Daniel Calviño Sánchez 1f7c097bec Adjust public layout for guest users to changes in server
Until now the public layout for guest users was based on the "base"
layout of the server, which was almost empty, and the "index-public"
template had to provide all the elements mimicking those used for public
pages in the server. The recent layout changes in the server have
introduced some structure changes in that base layout, which is now more
cumbersome to use with Talk.

Fortunately, in Nextcloud 14 a standard layout for public pages was
introduced, so now the public layout for guest users is based on that
public layout of the server instead. Therefore, it is no longer needed
to provide a header in the template, and the CSS rules used for the main
layout can be reused for the public layout.

There is a drawback, though; as the header is no longer a descendant of
"#app-content" it is no longer possible to make it transparent based on
the ".participants-XXX" classes set for that element. For now, and until
it is addressed, the header will still be visible during calls in guest
pages.

Also note that the public layout of the server does not provide at this
time a notification container, so that element must be kept.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-07-27 22:26:09 +02:00
Joas Schilling 15ad813d3c
Trigger an event for system messages aswell
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-27 11:05:36 +02:00
Joas Schilling e89a766a7e
Do not fail when there was no session id
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-27 11:02:59 +02:00
Joas Schilling a4b27df424
Make the system message type available via the api
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-27 11:02:08 +02:00
Joas Schilling ee4ba11a53
Start with system chat messages
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-27 11:01:38 +02:00
Joas Schilling f37e260ac5
Left join the last comment instead of doing O(n) queries
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-26 15:19:29 +02:00
Mario Danic e3071bf5cd
Add support for last message when fetching a room
Signed-off-by: Mario Danic <mario@lovelyhq.com>
2018-07-26 15:17:01 +02:00
Joas Schilling bedc02cfc4
Make sure an empty session doesn't fail the call
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-24 08:43:12 +02:00
Joas Schilling 97206cae09
Also 404 when it fails at the end
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-24 08:43:12 +02:00
Joas Schilling 201006b586
Also ping when chatting
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-24 08:43:11 +02:00
Joas Schilling ac930a5a97
Improve handling of missing session
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-24 08:43:11 +02:00
Joas Schilling 3e326172f7
Remove useless ping call and "ping" with the signaling fetch instead
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-24 08:43:11 +02:00
Joas Schilling abdc567b92
Fix some follow up issues with 1020
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-20 12:52:42 +02:00
Joas Schilling f4821457ee
Merge pull request #1020 from Peterede/verify-password-hook
Added hook to verify password to allow custom password check
2018-07-20 12:42:38 +02:00
Joas Schilling 84b556629c
Store the timestamp of the last activity in a room and sort by that, instead of the last ping
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-19 13:51:09 +02:00
Peter Edens 09b0c01df9 Requested changes from review. Signed-off-by: Peter Edens <petere@conceiva.com> 2018-07-18 09:49:16 +10:00
Joas Schilling 1add86b280
Handle the favorite on the participant object and fix favorite spelling
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-13 16:32:49 +02:00
Mario Danic 62b11f9a9f
Add support for backend favorites
Signed-off-by: Mario Danic <mario@lovelyhq.com>
2018-07-13 15:44:13 +02:00
Joas Schilling b061503d2c
Merge pull request #1028 from nextcloud/feature/noid/token-instead-of-id-in-notifications
Use the token instead of the id to identify the room objects
2018-07-13 13:43:47 +02:00
Peter Edens 12e82507db Returning result and redirect url from verifyPassword. Signed-off-by: Peter Edens <petere@conceiva.com> 2018-07-12 13:20:57 +10:00
Joas Schilling 7a505615de
Simplify the code and allow 100 secs as timeout (3 pings and a little buffer)
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-10 16:53:01 +02:00
Daniel Calviño Sánchez efad428132
Force inactive users to leave the room
Inactive guests (those that have not sent a ping in the last 30 seconds)
are automatically cleaned from a room when the information for that room
is got. In the same way, now inactive users are forced to leave the room
too when the information for the room is got.

Although all inactive guests are cleaned all at once inactive users are
forced to leave the room one by one (each one with its own SQL query);
although it would be better to force all the inactive users to leave the
room at once this should not be a big problem, as users would usually
leave the room cleanly; only crashed clients or other exceptional
situations should cause a user to be inactive.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-07-10 16:53:01 +02:00
Joas Schilling 4c3686ed91
Also migrate chat notifications to token
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-07-09 16:44:23 +02:00
Joachim Bauch cc2ee6c0c5
Simplify check for "action" value in room request.
Signed-off-by: Joachim Bauch <bauch@struktur.de>
2018-06-21 12:05:11 +02:00
Ivan Sein 7473ccc5b2
Merge pull request #910 from nextcloud/more-signaling-fixes
More standalone signaling fixes
2018-06-15 10:08:36 +02:00
Joachim Bauch a5b899c8ba
Use standalone signaling server to notify about new chat messages.
This removes the long-polling against the PHP backend and instead sends an
event to all users in a room through the standalone signaling server to
notify that new chat messages exist.

Signed-off-by: Joachim Bauch <bauch@struktur.de>
2018-06-12 12:05:27 +02:00
Joachim Bauch bd98c8239f
Support optional "leave" backend room events.
This will be triggered when a user disconnects from the the standalone
signaling server and with that leaves a room. The participant will be
removed immediately from the users list instead after the ping timeout.

Signed-off-by: Joachim Bauch <bauch@struktur.de>
2018-05-18 15:17:55 +02:00
Joas Schilling 964c2fadcc
Do not update the participant list twice
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-05-08 13:08:20 +02:00
Joas Schilling 35d7fea9fa
Return the room name on creation
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-05-02 14:04:56 +02:00
Joas Schilling d8c56b4608 Add a comment
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:50:20 +02:00
Joas Schilling 982bf986ba Add docs for the /mentions endpoint
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:50:20 +02:00
Joas Schilling 63831a4455 Sort suggestions by last chat message
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:46:58 +02:00
Joas Schilling 1472935fb5 Start autocomplete for mentions
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-26 12:46:58 +02:00
Joas Schilling f24177ee4b
Merge pull request #805 from nextcloud/format-mentions-without-avatars-in-the-message-list
Format mentions (without avatars) in the message list
2018-04-25 10:53:54 +02:00
Daniel Calviño Sánchez 16524668b8 Return rich messages when calling "receiveMessages"
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2018-04-24 17:47:18 +02:00
Joas Schilling 09a7bd51c7
Merge pull request #807 from nextcloud/bugfix/noid/display-name-should-be-a-string
Make sure the displayname is always a string
2018-04-24 16:49:04 +02:00
Joas Schilling e924958052
Make sure the displayname is always a string
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-24 16:34:57 +02:00
Joas Schilling 47255e543d
Add unread message count to the room list
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-24 16:28:32 +02:00
Joas Schilling 628cd11b16
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-20 11:03:09 +02:00
Joas Schilling 2f4adcb9c1
Add proper chat message offset support
The offset now is based on the last known chat message instead of limit-offset,
so new messages don't mess up requests to get the history of a room

Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-04-20 11:03:09 +02:00
Joas Schilling dcc5e96512
Correctly leave the room (not the call) in integration tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-28 11:41:24 +02:00
Joas Schilling 3ec66a2044
Abstract away the session handling
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-27 17:16:38 +02:00
Joas Schilling b314bd0ae4
Don't leave all rooms when joining
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-27 17:16:38 +02:00
Joas Schilling d5b0d39ef3
Unify the names of join/leave room vs. remove*FromRoom
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-27 17:16:37 +02:00
Joas Schilling 0be200e099
Update participant list also when not in call
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-21 15:15:54 +01:00
Ivan Sein b0e70066d0
Merge pull request #710 from nextcloud/bugfix/414/guest-names
Store guest names
2018-03-21 10:08:16 +01:00
Joas Schilling 0ad6c51d1f
Merge pull request #720 from nextcloud/bugfix/noid/dont-check-for-password-when-there-is-no-room
Don't check for a password, when we didn't even find a room
2018-03-21 09:21:12 +01:00
Morris Jobke 14f470490c
Remove unused dependency to logger
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-03-21 08:58:49 +01:00
Joas Schilling f517b367da
Don't check for a password, when we didn't even find a room
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-21 08:46:07 +01:00
Joas Schilling b09587d68b
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-20 13:55:14 +01:00
Joas Schilling ee2367f16c
Show guest names in the participant list
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-20 10:57:19 +01:00
Joas Schilling afcd192587
Send a request to the server when a guest renames
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-20 10:30:22 +01:00
Joas Schilling c2387c534e
Store guest names when they leave a comment
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-19 13:07:11 +01:00
Joas Schilling 9ae9924d04
Make sure users with numerical user ids/display names still show as users
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-12 15:24:23 +01:00
Joas Schilling d1237a4ba0
Also delete rooms when the leaving user is the only non-guest
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-03-09 14:09:32 +01:00
Joas Schilling 7fa8a97371
Do not allow one2one calling yourself
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-02-13 18:26:27 +01:00
Joas Schilling f1be18edc0
Allow to create group rooms without inviting anyone
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-02-08 10:07:41 +01:00
Joas Schilling 95dfd7f1a8
Allow to get signaling settings as guests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-02-07 16:54:50 +01:00
Joachim Bauch e3ef4d23b9
Return "DataResponse" to be OCS compatible.
Signed-off-by: Joachim Bauch <bauch@struktur.de>
2018-02-02 11:43:00 +01:00
Joachim Bauch 8825193429
Add tests for the backend endpoint of "SignalingController".
Signed-off-by: Joachim Bauch <bauch@struktur.de>
2018-02-02 11:43:00 +01:00
Joachim Bauch b3c601a8cb
Split "room" from "call" when using the standalone signaling server.
Clients use the regular joinRoom/-Call API and get a Nextcloud session
id. No special handling for sessions from the standalone signaling
server are required.

The signaling server regularly "pings" active sessions to prevent them
from timing out (in case of guest users).

Signed-off-by: Joachim Bauch <bauch@struktur.de>
2018-02-02 11:42:59 +01:00
Joas Schilling bf7cbcd5fc
Add docs for chat and fix the links on github
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-01-26 15:03:41 +01:00
Joas Schilling 5339f73ec0
TypeError: Argument 1 passed to OC\\Security\\Hasher::verify() must be of the type string, null given
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-01-26 14:54:17 +01:00
Joas Schilling a6f6e7a87b
Use search input as room name for "New public call"
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-01-26 12:20:47 +01:00
Ivan Sein 700c9dd864
Merge pull request #502 from nextcloud/bugfix/noid/fix-room-messages-with-room-call-split
Adjust the room/call message while waiting for a call
2017-12-11 20:08:43 +01:00
Joas Schilling 5670fcb9ad
Allow apps to get the signaling information
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-11-28 17:50:38 +01:00
Joas Schilling 49288d746c
Adjust the room/call message while waiting for a call
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-11-22 15:09:13 +01:00
Joas Schilling 92a1af6596
Use a different object type for all the notifications
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-11-22 11:01:17 +01:00
Joas Schilling 335ad722c2
Mark mention notifications as read, when the user pulls the chat messages of the room
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-11-20 13:53:59 +01:00
Joas Schilling f4308ef428
Code cleanup
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-11-20 12:09:36 +01:00
Joas Schilling 3a4982dac9
Merge pull request #486 from nextcloud/fix/noid/signaling-backend
Fix multiple minor issues with the Signaling BackendNotifier
2017-11-17 14:32:23 +01:00
Joas Schilling ceaedb2c54
Make sure $signaling is defined
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-11-17 14:31:49 +01:00
Joas Schilling ffd6378d83
Move notification generation to hooks as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-11-15 15:34:26 +01:00
Joas Schilling 63eb22b213
Create invitation activity "{actor} invited you to {call}" via hook
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-11-15 14:38:30 +01:00
Joas Schilling 4eb3297786
Also skip guests which are not in the call
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-11-10 14:10:42 +01:00
Joas Schilling fbed3e3870
Fix guest/user handling in join/leave call
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-11-10 14:10:16 +01:00
Joas Schilling eae71a3977 Split joining a room and joining a call API wise
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-11-03 13:04:52 +01:00
Joachim Bauch 51889d5376
Fix passing of configured servers to the UI and wrong own URL to validate users.
Signed-off-by: Joachim Bauch <bauch@struktur.de>
2017-11-02 11:23:52 +01:00
Joas Schilling f7f9e7929c
Allow multiple signaling servers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-11-02 11:23:51 +01:00
Joachim Bauch 1f769692e2
Use events to notify the backend about room changes.
Signed-off-by: Joachim Bauch <bauch@struktur.de>
2017-11-02 11:23:51 +01:00
Joachim Bauch af4e2b076f
Return "DataResponse" instead of throwing if the internal signaling is disabled.
Signed-off-by: Joachim Bauch <bauch@struktur.de>
2017-11-02 11:23:11 +01:00
Joachim Bauch 5cb56b5659
Allow setting up multiple signaling servers.
Signed-off-by: Joachim Bauch <bauch@struktur.de>
2017-11-02 11:23:10 +01:00
Joachim Bauch 6ee066ab08
Set STUN/TURN server through settings instead of performing requests.
Signed-off-by: Joachim Bauch <bauch@struktur.de>
2017-11-02 11:23:10 +01:00
Joachim Bauch e083e72256
Pass all signaling-related settings as JSON object to frontend.
Signed-off-by: Joachim Bauch <bauch@struktur.de>
2017-11-02 11:23:10 +01:00
Joachim Bauch c4cf35c617
Update ping time when user joins a room.
Signed-off-by: Joachim Bauch <bauch@struktur.de>
2017-11-02 11:23:09 +01:00
Joachim Bauch 55a16fadd7
Send all participants to backend when invited users of a room change.
All existing participants need to update the room, so the signaling server
needs to know who to notify.

Signed-off-by: Joachim Bauch <bauch@struktur.de>
2017-11-02 11:23:09 +01:00
Joachim Bauch bb9f8e5183
Don't always skip certificate verification of connections to backend.
Make it a configuration option instead.

Signed-off-by: Joachim Bauch <bauch@struktur.de>
2017-11-02 11:23:09 +01:00
Joachim Bauch be33ec8d9c
Implement backend APIs to be used by standalone signaling server.
A standalone signaling server can be configured in the admin UI and is
notified through the BackendController on changes that should be sent to
connected clients.

See #339 for a description of the backend API.

Signed-off-by: Joachim Bauch <bauch@struktur.de>
2017-11-02 11:23:09 +01:00
Daniel Calviño Sánchez ce9155289b Fix password protected rooms in chat backend
Before, any user was able to send and receive messages to and from
public password protected rooms, even if they were not invited and they
had not joined it; guests were not able to send, but were able to
receive nevertheless. Now, only invited users or users/guests that have
joined a public password protected room can send and receive messages to
and from it.

As a side effect that change affects too to regular public rooms (not
password protected), but the new behaviour makes more sense than the old
one anyway.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-10-20 03:49:07 +02:00
Daniel Calviño Sánchez 943a85d869 Use the room ID instead of the token as the object ID of chat comments
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-10-20 03:49:07 +02:00
Daniel Calviño Sánchez 0e29c7b39e Fix storing a spreed-session as an actorId
The character limit for actorId is 64, but the spreed-session is 256
characters long, so it has to be hashed to get an ID that fits.

The sha1 algorithm is used as, from all the hash functions bundled with
PHP that are always available (the Hash extension can be disabled using
the "--disable-hash" switch, unlike those that are part of the string
functions), it generates the longest hashes (40 characters) that fit in
the actorId column of the database.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-10-20 03:49:07 +02:00
Daniel Calviño Sánchez 9eb3611db5 Add controller for chat messages
The ChatController uses a long-polling approach: if there are currently
no messages the response will not be sent immediately; instead, HTTP
connection will be kept open waiting for new messages to arrive and,
when they do, then the response will be sent.

The technique is simply based on the fact that ChatManager will wait
(hang) until there are some messages to be returned, or until the
timeout expires.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2017-10-20 03:49:07 +02:00
Joas Schilling e5eb17a4a0
Fix infinite redirect when following the link in a contacts menu
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-10-19 14:57:04 +02:00
Joas Schilling 86ec1dd446
Don't use popup to ask for the password but the "blue screen"
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-10-11 14:39:53 +02:00
Joas Schilling c7e55a8953 Merge pull request #427 from nextcloud/move-admin-settings-to-own-section
Admin settings
2017-10-06 11:29:19 +02:00
Joas Schilling 818f06e079
Remove unused session id
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-10-05 15:23:56 +02:00
Joas Schilling 9e2e39a614
Allow multiple turn servers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-28 15:53:59 +02:00
Joas Schilling 2a33f7fd1a
Allow setting multiple STUN servers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-28 15:53:59 +02:00
Joas Schilling 4f9207b389
Make sure we send the user list at least all 30 seconds
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-26 11:08:50 +02:00
Joas Schilling 288c1bb321
Fix spelling of Signaling (single L)
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-25 15:32:15 +02:00
Joas Schilling 9da1bf3343
Remove queries from controller
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-25 15:32:14 +02:00
Ivan Sein 3f02e9d9c6
Remove 2 seconds wait pulling messages.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
2017-09-25 15:32:14 +02:00
Joas Schilling 8108d3587f
Use an OCS controller and long polling instead of event sources
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-25 15:32:14 +02:00
Joas Schilling 9a6c4410a1
Add events when participants disconnect
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-25 15:31:42 +02:00
Joas Schilling 5ab5095505
Add a (collective) event when adding users to a call
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-25 15:31:42 +02:00
Joas Schilling 925761577c
Fail when the user is not a participant
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-22 16:16:26 +02:00
Joas Schilling 5ba66c0de0
Remove self-joined users from the list after leaving
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-22 16:16:05 +02:00
Joas Schilling ff26dc022c
Allow accessing the peers for users which are part of the room
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-22 16:16:04 +02:00
Joas Schilling ff6bddb29d
Only return limited information before password verification
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-22 16:16:04 +02:00
Joas Schilling 1eb766eb01
Hash the passwords
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-22 16:16:04 +02:00
Joas Schilling f8a9f124f8
Add option for the moderator to set a password
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-22 16:16:04 +02:00
Joas Schilling 504acc5b85
Add endpoint to set the password
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-22 16:16:04 +02:00
Joas Schilling dcd8210027
Start implementing room passwords
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-22 16:16:04 +02:00
Joas Schilling fdb1071217
Fix inspection errors (although they can not happen *cough*)
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-22 14:35:25 +02:00
Joas Schilling 0c3fdb72b3
Add a dedicated exception for participants
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-22 14:32:07 +02:00
Joas Schilling 18651b9d4f
Fix deleting of guests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-19 16:46:54 +02:00
Ivan Sein 815c509259 Merge pull request #377 from nextcloud/sidebar
Start with sidebar
2017-09-19 14:04:20 +02:00
Joas Schilling ffeaf88760
Move all signalling queries into a dedicated class
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-14 15:28:42 +02:00
Joas Schilling cf533647e7
Fix the signalling table
- Remove duplicate column
- Remove unneeded primary key
- Group deletion of messages into one query

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-09-14 15:12:50 +02:00
Joas Schilling bc0afbe238
Fix loading participants into the sidebar
menu still broken

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-25 18:09:04 +02:00
Joas Schilling e76c6e9dfe
Allow to get all participants as a collection
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-25 17:17:22 +02:00
Joas Schilling 8c1691cdc1
Do not allow to leave rooms you are not part of
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-07 12:53:58 +02:00
Joas Schilling 01297b2ec0
You can only promote normal users...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-08-07 12:53:58 +02:00
Joas Schilling 022cfdc48f
Correctly generate display name from participant list
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-17 11:05:51 +02:00
Joas Schilling c7a3c95962
Fix displaying the options in the UI only when the user has permissions
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-17 11:05:51 +02:00
Joas Schilling 204640364a
Add an option for moderators and owners to delete a call
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-17 11:05:51 +02:00
Joas Schilling f0d41b548e
Also expose the participant type with the list
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-17 11:05:51 +02:00
Joas Schilling c15645a730
Do not allow to demote yourself
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-17 11:05:51 +02:00
Joas Schilling 451bd8e82b
Endpoint to remove a user from a room
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-17 11:05:51 +02:00
Joas Schilling 96f762e92d
UserId not object on addParticipant
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-17 11:05:51 +02:00
Joas Schilling 86a3566e25
Endpoint to promote and demote moderators
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-17 11:05:51 +02:00
Joas Schilling 9d6d4f87e5
Restrict renaming, inviting and public/private to owner and moderators
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-17 11:05:51 +02:00
Joas Schilling 8a3dd6757c
Add participant types
* one2one calls have two owners
* for group and public calls the creator is the owner

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-17 11:05:51 +02:00
Joas Schilling 772d47cf10
Use token instead of id on all urls
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-12 12:01:04 +02:00
Joas Schilling 0d455abcee
Add token to the leave call request as well
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-12 12:01:04 +02:00
Joas Schilling 7c8441c793
Combine the createRoom methods
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-12 12:01:03 +02:00
Joas Schilling 5128e18993
Fix DI
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-12 11:53:17 +02:00
Joas Schilling eaa0696673
Rename getPeers* method because it is for calling
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-12 11:53:17 +02:00
Joas Schilling 9b173a1cdd
Move getRoom(s) methods to RoomController
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-12 11:53:16 +02:00
Joas Schilling 59eb47f3d3
Rename ping method and simplify the sorting function
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-12 11:53:16 +02:00
Joas Schilling f0b4517bd3
Clarify leave methods...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-12 11:53:16 +02:00
Joas Schilling b274441c61
Split the API controller into 2
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-07-12 11:53:16 +02:00
Joas Schilling cdada8370a
Move API to OCS
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-06-12 17:33:50 +02:00
Joas Schilling 399b3ccc2d
Use the new short url
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-26 16:39:45 +02:00
Joas Schilling aafe842d41
Oppsy
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-26 14:37:12 +02:00
Joas Schilling ea2d2a4fad
Open one2one call when the user follows the link
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-26 12:27:50 +02:00
Joas Schilling 04ee52564f
Allow logged in users to join public rooms again
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-21 14:27:29 +02:00
Joas Schilling 3c88d59d64
Stop the app framework from doing stuff
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-04 15:07:41 +02:00
Ivan Sein 0be2bcace0 Restart EventSource if no spreed session.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
2017-04-03 17:25:39 +02:00
Joas Schilling 80ea0c4798
Fix short URLs
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-24 12:28:28 +01:00
Joas Schilling 1bf8096f4a
Fix joining the room after creation
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-24 12:28:02 +01:00
Joas Schilling 17ee439bf3
Redirect to login instead of showing a dumb error
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-24 11:22:04 +01:00
Joas Schilling 45c6cfb57c
Use the token for all public API calls
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-24 11:22:04 +01:00
Joas Schilling 2bfcc54e26
Make the PageController work with the token
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-24 11:22:01 +01:00
Joas Schilling afb0999ab6
Fix code type hints
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-24 11:18:43 +01:00
Joas Schilling 680a018959
Add activities when you were invited to a call
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-02-23 15:31:47 +01:00