Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
RocketChat
Rocket.Chat.ReactNative
Commits
1aadb883
Commit
1aadb883
authored
Jan 07, 2020
by
Djorkaeff Alexandre
Committed by
Diego Mello
Jan 07, 2020
Browse files
[FIX] Server Test Push Notification (#1508)
Co-authored-by:
Diego Mello
<
diegolmello@gmail.com
>
parent
f681a3e3
Changes
2
Hide whitespace changes
Inline
Side-by-side
android/app/src/main/java/chat/rocket/reactnative/CustomPushNotification.java
View file @
1aadb883
...
...
@@ -61,7 +61,7 @@ public class CustomPushNotification extends PushNotification {
}
notificationMessages
.
get
(
notId
).
add
(
message
);
super
.
postNotification
(
Integer
.
parseInt
(
notId
));
super
.
postNotification
(
notId
!=
null
?
Integer
.
parseInt
(
notId
)
:
1
);
notifyReceivedToJS
();
}
...
...
@@ -91,7 +91,7 @@ public class CustomPushNotification extends PushNotification {
.
setDefaults
(
Notification
.
DEFAULT_ALL
)
.
setAutoCancel
(
true
);
Integer
notificationId
=
Integer
.
parseInt
(
notId
);
Integer
notificationId
=
notId
!=
null
?
Integer
.
parseInt
(
notId
)
:
1
;
notificationChannel
(
notification
);
notificationIcons
(
notification
,
bundle
);
notificationStyle
(
notification
,
notificationId
,
bundle
);
...
...
android/app/src/main/java/chat/rocket/reactnative/Ejson.java
View file @
1aadb883
...
...
@@ -14,7 +14,7 @@ public class Ejson {
private
SharedPreferences
sharedPreferences
=
RNUserDefaultsModule
.
getPreferences
(
CustomPushNotification
.
reactApplicationContext
);
public
String
getAvatarUri
()
{
if
(!
type
.
equals
(
"d"
))
{
if
(
type
==
null
||
!
type
.
equals
(
"d"
))
{
return
null
;
}
return
serverURL
()
+
"/avatar/"
+
this
.
sender
.
username
+
"?rc_token="
+
token
()
+
"&rc_uid="
+
userId
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment