diff --git a/app/widgets/Chat/Chat.php b/app/widgets/Chat/Chat.php
index a0b156b3e..c40ac1c97 100644
--- a/app/widgets/Chat/Chat.php
+++ b/app/widgets/Chat/Chat.php
@@ -357,7 +357,6 @@ class Chat extends \Movim\Widget\Base
$this->rpc('Chat.setObservers');
$this->prepareMessages($jid);
$this->rpc('Notification.current', 'chat|'.$jid);
- Notification::clearAndroid($this->route('chat', [$jid]));
$this->rpc('Chat.scrollToSeparator');
// OMEMO
@@ -407,7 +406,6 @@ class Chat extends \Movim\Widget\Base
$this->rpc('Chat.setObservers');
$this->prepareMessages($room, true);
$this->rpc('Notification.current', 'chat|'.$room);
- Notification::clearAndroid($this->route('chat', [$room, 'room']));
$this->rpc('Chat.scrollToSeparator');
// OMEMO
diff --git a/app/widgets/Login/login.tpl b/app/widgets/Login/login.tpl
index 2379d61f8..98094973c 100644
--- a/app/widgets/Login/login.tpl
+++ b/app/widgets/Login/login.tpl
@@ -190,22 +190,10 @@
-
diff --git a/app/widgets/Notification/Notification.php b/app/widgets/Notification/Notification.php
index b88e37b8b..4114e923a 100644
--- a/app/widgets/Notification/Notification.php
+++ b/app/widgets/Notification/Notification.php
@@ -46,15 +46,6 @@ class Notification extends Base
self::rpcCall(null);
}
- /**
- * Clear the notification for Android using a local event and
- * push notification event
- */
- public static function clearAndroid(string $action)
- {
- RPC::call('Notification.clearAndroid', $action);
- }
-
/**
* @brief Notify something
*
@@ -117,7 +108,9 @@ class Notification extends Base
'body' => $body,
'picture' => $picture,
'action' => $action,
+ 'group' => $group,
'execute' => $execute,
+ 'button' => __('button.open')
])
);
}
@@ -138,16 +131,6 @@ class Notification extends Base
$explode = explode('|', $key);
$first = reset($explode);
- // What we receive is not what it's on the screen on Android
- if ($key != null && $key != $notifsKey && $title != null) {
- if ($group != null) {
- $action = $group;
- }
-
- // We try to deliver it trough the WebSocket
- RPC::call('Notification.android', $title, $body, $picture, $action);
- }
-
if (array_key_exists($first, $notifs)) {
$notifs[$first]++;
} else {
diff --git a/app/widgets/Notification/notification.js b/app/widgets/Notification/notification.js
index b24298a5d..483d832ed 100644
--- a/app/widgets/Notification/notification.js
+++ b/app/widgets/Notification/notification.js
@@ -129,8 +129,7 @@ var Notification = {
Notification_ajaxCurrent(Notification.notifs_key);
},
snackbar : function(html, time) {
- if (typeof Android !== 'undefined'
- || Notification.inhibed == true) return;
+ if (Notification.inhibed == true) return;
target = document.getElementById('snackbar');
@@ -191,18 +190,6 @@ var Notification = {
DesktopNotification.requestPermission();
}
},
- android : function(title, body, picture, action) {
- if (typeof Android !== 'undefined') {
- Android.showNotification(title, body, picture, action);
- return;
- }
- },
- clearAndroid : function(action) {
- if (typeof Android !== 'undefined') {
- Android.clearNotifications(action);
- return;
- }
- },
focus : function() {
if (Notification.focused == false) {
Notification.focused = true;
diff --git a/app/widgets/Toast/toast.js b/app/widgets/Toast/toast.js
index 418078899..4796ff847 100644
--- a/app/widgets/Toast/toast.js
+++ b/app/widgets/Toast/toast.js
@@ -1,11 +1,5 @@
var Toast = {
send : function(title) {
- // Android notification
- if (typeof Android !== 'undefined') {
- Android.showToast(title);
- return;
- }
-
target = document.getElementById('toast');
if (target) {
diff --git a/app/widgets/Visio/visio.js b/app/widgets/Visio/visio.js
index b8930594c..531218077 100644
--- a/app/widgets/Visio/visio.js
+++ b/app/widgets/Visio/visio.js
@@ -324,19 +324,11 @@ var Visio = {
button.onclick = () => {
window.close();
-
- if (typeof Android !== 'undefined') {
- Android.closePopUpWebview();
- }
}
// And we force close the window after 2sec
window.setTimeout(() => {
window.close();
-
- if (typeof Android !== 'undefined') {
- Android.closePopUpWebview();
- }
}, 2000);
},
diff --git a/app/widgets/VisioLink/visiolink.js b/app/widgets/VisioLink/visiolink.js
index f4bdf9c41..7e84e1236 100644
--- a/app/widgets/VisioLink/visiolink.js
+++ b/app/widgets/VisioLink/visiolink.js
@@ -4,10 +4,6 @@ var VisioLink = {
var idUrl = id ? '/' + id : '';
var page = withVideo ? 'visio' : 'visioaudio';
- if (typeof Android !== 'undefined') {
- Android.openVisio(BASE_HOST + '/' + '?' + page + '/' + from + idUrl);
- } else {
- VisioLink.window = window.open('?' + page + '/' + from + idUrl, '', 'width=600,height=400,status=0,titlebar=0,toolbar=0,menubar=0');
- }
+ VisioLink.window = window.open('?' + page + '/' + from + idUrl, '', 'width=600,height=400,status=0,titlebar=0,toolbar=0,menubar=0');
}
}
diff --git a/composer.lock b/composer.lock
index 0a1c3d026..a27d2de16 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1828,7 +1828,7 @@
},
{
"name": "illuminate/bus",
- "version": "v8.83.7",
+ "version": "v8.83.8",
"source": {
"type": "git",
"url": "https://github.com/illuminate/bus.git",
@@ -1881,7 +1881,7 @@
},
{
"name": "illuminate/collections",
- "version": "v8.83.7",
+ "version": "v8.83.8",
"source": {
"type": "git",
"url": "https://github.com/illuminate/collections.git",
@@ -1935,7 +1935,7 @@
},
{
"name": "illuminate/container",
- "version": "v8.83.7",
+ "version": "v8.83.8",
"source": {
"type": "git",
"url": "https://github.com/illuminate/container.git",
@@ -1986,7 +1986,7 @@
},
{
"name": "illuminate/contracts",
- "version": "v8.83.7",
+ "version": "v8.83.8",
"source": {
"type": "git",
"url": "https://github.com/illuminate/contracts.git",
@@ -2034,16 +2034,16 @@
},
{
"name": "illuminate/database",
- "version": "v8.83.7",
+ "version": "v8.83.8",
"source": {
"type": "git",
"url": "https://github.com/illuminate/database.git",
- "reference": "ab8052c033036383fc2811fc9a518b5984e040a9"
+ "reference": "5a09b780d86613127cddbeb05e4dde22aeccbedf"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/illuminate/database/zipball/ab8052c033036383fc2811fc9a518b5984e040a9",
- "reference": "ab8052c033036383fc2811fc9a518b5984e040a9",
+ "url": "https://api.github.com/repos/illuminate/database/zipball/5a09b780d86613127cddbeb05e4dde22aeccbedf",
+ "reference": "5a09b780d86613127cddbeb05e4dde22aeccbedf",
"shasum": ""
},
"require": {
@@ -2098,11 +2098,11 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
- "time": "2022-03-21T16:13:31+00:00"
+ "time": "2022-04-07T15:04:12+00:00"
},
{
"name": "illuminate/events",
- "version": "v8.83.7",
+ "version": "v8.83.8",
"source": {
"type": "git",
"url": "https://github.com/illuminate/events.git",
@@ -2157,7 +2157,7 @@
},
{
"name": "illuminate/macroable",
- "version": "v8.83.7",
+ "version": "v8.83.8",
"source": {
"type": "git",
"url": "https://github.com/illuminate/macroable.git",
@@ -2203,7 +2203,7 @@
},
{
"name": "illuminate/pipeline",
- "version": "v8.83.7",
+ "version": "v8.83.8",
"source": {
"type": "git",
"url": "https://github.com/illuminate/pipeline.git",
@@ -2251,16 +2251,16 @@
},
{
"name": "illuminate/support",
- "version": "v8.83.7",
+ "version": "v8.83.8",
"source": {
"type": "git",
"url": "https://github.com/illuminate/support.git",
- "reference": "5dd2ffb98c6169f8fcf84c065da3c27289e737af"
+ "reference": "3f1de19528fc235d666f73d540d13a684da6bf3a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/illuminate/support/zipball/5dd2ffb98c6169f8fcf84c065da3c27289e737af",
- "reference": "5dd2ffb98c6169f8fcf84c065da3c27289e737af",
+ "url": "https://api.github.com/repos/illuminate/support/zipball/3f1de19528fc235d666f73d540d13a684da6bf3a",
+ "reference": "3f1de19528fc235d666f73d540d13a684da6bf3a",
"shasum": ""
},
"require": {
@@ -2315,7 +2315,7 @@
"issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework"
},
- "time": "2022-04-04T15:14:19+00:00"
+ "time": "2022-04-11T14:26:37+00:00"
},
{
"name": "league/commonmark",
@@ -2568,16 +2568,16 @@
},
{
"name": "monolog/monolog",
- "version": "2.4.0",
+ "version": "2.5.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
- "reference": "d7fd7450628561ba697b7097d86db72662f54aef"
+ "reference": "4192345e260f1d51b365536199744b987e160edc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Seldaek/monolog/zipball/d7fd7450628561ba697b7097d86db72662f54aef",
- "reference": "d7fd7450628561ba697b7097d86db72662f54aef",
+ "url": "https://api.github.com/repos/Seldaek/monolog/zipball/4192345e260f1d51b365536199744b987e160edc",
+ "reference": "4192345e260f1d51b365536199744b987e160edc",
"shasum": ""
},
"require": {
@@ -2651,7 +2651,7 @@
],
"support": {
"issues": "https://github.com/Seldaek/monolog/issues",
- "source": "https://github.com/Seldaek/monolog/tree/2.4.0"
+ "source": "https://github.com/Seldaek/monolog/tree/2.5.0"
},
"funding": [
{
@@ -2663,7 +2663,7 @@
"type": "tidelift"
}
],
- "time": "2022-03-14T12:44:37+00:00"
+ "time": "2022-04-08T15:43:54+00:00"
},
{
"name": "nesbot/carbon",
diff --git a/locales/locales.ini b/locales/locales.ini
index 23db38670..f867ff924 100644
--- a/locales/locales.ini
+++ b/locales/locales.ini
@@ -86,6 +86,7 @@ sign_up = Sign Up
send_to = Send to
more = More
copy_link = Copy Link
+open = Open
[input]
username = Username
diff --git a/public/sw.js b/public/sw.js
index 4ee108fdd..ab4fedd6c 100644
--- a/public/sw.js
+++ b/public/sw.js
@@ -48,7 +48,7 @@ self.addEventListener('push', function(e) {
icon: json.picture,
vibrate: [100, 50, 100],
data: { url: json.action },
- actions: [{action: "action", title: 'Open chat'}]
+ actions: [{action: "action", title: json.button}]
};
e.waitUntil(
self.registration.showNotification(json.title, options)