Commit Graph

10083 Commits

Author SHA1 Message Date
Daniel Calviño Sánchez
4eaa2f3e2c Split condition
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-03 11:29:22 +00:00
Daniel Calviño Sánchez
f34bc17b36 Rewrite method to return early
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-03 11:29:22 +00:00
Daniel Calviño Sánchez
a3cf897d13 Move variable declaration into try block
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-03 11:29:22 +00:00
Daniel Calviño Sánchez
014b18de89 Fix remote data channels not disposed when removing peer connection
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-03 11:29:22 +00:00
Daniel Calviño Sánchez
3ffc6db56d Send data channel messages using "status" data channel
Data channel messages are expected to be sent using the "status" data
channel that is locally created. However, if another data channel was
opened by the remote peer the reference to the "status" data channel was
overwritten with the new data channel, and messages were sent instead on
the remote data channel.

In current Talk versions that was not a problem, and the change makes no
difference either, because since the support for Janus 1.x was added
data channel messages are listened on all data channels, independently
of their label or whether they were created by the local or remote peer.

However, in older Talk versions this fixes a regression introduced with
the support for Janus 1.x. In those versions only messages coming from
the "status" or "JanusDataChannel" data channels were taken into
account. When Janus is not used the WebUI opens the legacy
"simplewebrtc" data channel, so that data channel may be the one used to
send data channel messages (if it is open after the "status" data
channel), but the messages received on that data channel were ignored by
the WebUI. Nevertheless, at this point this is more an academic problem
than a real world problem, as it is unlikely that there are many
Nextcloud servers with Talk < 16 and without HPB being used.

Independently of all that, when the peer connection is removed only the
"status" data channel is disposed, but none of the remote data channels
are. This is just a variation of an already existing bug (the last open
data channel was the one disposed due to being the last saved reference,
but the rest were not) and it will be fixed in another commit.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-03 11:29:22 +00:00
Daniel Calviño Sánchez
d1a4265491 Rename "sendChannelData" to "send"
The legacy name was a bit strange, so now it is renamed to just "send"
as the parameter type ("DataChannelMessage") gives enough context.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-03 11:29:22 +00:00
Daniel Calviño Sánchez
1f4c25caa3 Include data channel label in log message
This implicitly fixes trying to send the initial state on the latest
remote data channel found (which is the one stored in the "dataChannel"
attribute of the "PeerConnectionWrapper") when any other existing data
channel changes its status to open. Nevertheless, as all this will be
reworked, no unit test was added for it.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-03 11:29:22 +00:00
Daniel Calviño Sánchez
0555e0edbd Unify log messages for received data channel messages
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-03 11:29:22 +00:00
Daniel Calviño Sánchez
a43a33a16a Add unit tests for receiving data channel messages
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-03 11:29:22 +00:00
Daniel Calviño Sánchez
26be065545 Add dummy Log implementation to be used in tests
Log methods are static, so they can not be mocked using Mockito.
Although it might be possible to use PowerMockito a dummy implementation
was added instead, as Log uses are widespread and it is not something
worth mocking anyway.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-03 11:29:22 +00:00
Daniel Calviño Sánchez
a1eb90da9f Remove Dagger related code from PeerConnectionWrapper
The PeerConnectionWrapper does not need to be injected in the
application, nor the Context needs to be injected in the
PeerConnectionWrapper. This all seems to be leftovers from the past, and
removing them would ease adding unit tests for the
PeerConnectionWrapper.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2025-01-03 11:29:21 +00:00
Nextcloud bot
3aa2be2ece
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2025-01-03 03:04:18 +00:00
Nextcloud bot
1628993b73
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-12-28 03:04:45 +00:00
Nextcloud bot
159096cc64
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-12-27 03:04:41 +00:00
Nextcloud bot
3e59a289f7
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-12-26 03:04:53 +00:00
Nextcloud bot
bfe7a6576f
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-12-25 03:04:26 +00:00
Nextcloud bot
7cf93e9ffc
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-12-24 03:02:29 +00:00
Nextcloud bot
cb51f85037
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-12-23 03:02:16 +00:00
Nextcloud bot
ced2ac0951
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-12-22 03:19:17 +00:00
Nextcloud bot
1b84cb5e4e
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-12-21 03:03:52 +00:00
Nextcloud bot
43a2950822
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-12-19 03:04:23 +00:00
Nextcloud bot
5300980ba5
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-12-18 03:38:09 +00:00
Andy Scherzinger
4657d402cd
Merge pull request #4533 from nextcloud/backport/4525/stable-20.1
[stable-20.1] Fixed Message draft overlayed icon bug
2024-12-16 10:32:39 +01:00
rapterjet2004
6a8116e749 Fixed overlay bug
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
2024-12-16 10:06:40 +01:00
Andy Scherzinger
ce285ee6a0
Merge pull request #4547 from nextcloud/backport/4544/stable-20.1
[stable-20.1] detekt improvements
2024-12-16 10:06:22 +01:00
Andy Scherzinger
baed490ccc
fix: Bump detekt score
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-16 09:18:58 +01:00
Andy Scherzinger
e540eb97dc
style: Fix formatting
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-16 09:18:57 +01:00
Andy Scherzinger
eb3b2f6e97
style(detekt): Restrict the number of return statements in methods
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-16 09:18:56 +01:00
github-actions
e59e71db6a
Analysis: update lint results to reflect reduced error/warning count
Signed-off-by: github-actions <github-actions@github.com>
2024-12-16 09:18:56 +01:00
Andy Scherzinger
ada56249da
style(detekt): Shorten methods
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-16 09:18:55 +01:00
Andy Scherzinger
78dc7fb2c7
fix(lint): Move suppressions due to refactoring
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-16 09:18:55 +01:00
Andy Scherzinger
0f6eab8b38
ci(detekt): Update current detekt score
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-16 09:18:54 +01:00
Andy Scherzinger
a034fc8237
style(ktlint): Fix formatting
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-16 09:18:53 +01:00
Andy Scherzinger
0687061efd
style(detekt): Shorten methods
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-16 09:18:52 +01:00
Andy Scherzinger
091531e2d2
style(detekt): Move magic number to constant
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-16 09:18:52 +01:00
Nextcloud bot
5dcf08637d
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-12-14 03:01:59 +00:00
Nextcloud bot
756f2d3b7c
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2024-12-13 03:02:55 +00:00
Marcel Hibbe
931a4c772c
Merge pull request #4532 from nextcloud/backport/4493/stable-20.1
[stable-20.1] display conversation avatar for open conversations
2024-12-10 10:04:28 +01:00
Marcel Hibbe
623e741876
Merge pull request #4530 from nextcloud/backport/4527/stable-20.1
[stable-20.1] Lower detekt score
2024-12-10 10:03:02 +01:00
sowjanyakch
fe45c13a54 remove unused models
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-12-10 08:42:08 +00:00
github-actions
034fdebd9e Analysis: update lint results to reflect reduced error/warning count
Signed-off-by: github-actions <github-actions@github.com>
2024-12-10 08:42:08 +00:00
sowjanyakch
e8f5afb2a5 refactor code - remove comments
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-12-10 08:42:08 +00:00
sowjanyakch
53a2ee51f0 suppress lint warning for invalid string format
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-12-10 08:42:07 +00:00
sowjanyakch
d2f8be984e ktlintFormat
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-12-10 08:42:07 +00:00
sowjanyakch
6037eefe18 Modify Adapter and ListOpenConversationsActivity
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-12-10 08:42:07 +00:00
sowjanyakch
f1051b5f52 Modify ViewModel
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-12-10 08:42:07 +00:00
sowjanyakch
aab4591f83 Use correct model
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
2024-12-10 08:42:07 +00:00
Andy Scherzinger
490a93bb3f style(detekt): shorten long methods
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2024-12-10 08:13:31 +00:00
Andy Scherzinger
bd84db0118 style(detekt): Shorten complex conditions
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-10 08:13:31 +00:00
Andy Scherzinger
0dcc2db3f1 ci(detekt): bump condition complexity threshold 4->5
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-12-10 08:13:31 +00:00