Skip to content

Commit 7f652dd

Browse files
author
Github
committed
Added client support for fast messaging.
1 parent 564b7a8 commit 7f652dd

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/src/main/java/eu/aero2x/andromedab/Conversation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public boolean onSubmit(final CharSequence input) {
136136
System.out.println("NO HAVE A CUSTOM NAME " + displayName);
137137
}
138138

139-
RemoteMessagesInterface.sendMessage(recipients,input.toString(),Conversation.this,new Response.Listener<String>() {
139+
RemoteMessagesInterface.sendMessage(recipients,input.toString(),parentConversation.getBoolean("has_manual_display_name"),Conversation.this,new Response.Listener<String>() {
140140
@Override
141141
public void onResponse(String response) {
142142
//The message sent!

app/src/main/java/eu/aero2x/andromedab/RemoteMessagesInterface.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,15 @@ public Map<String, String> getParams() throws AuthFailureError {
6666

6767
}
6868

69-
public static void sendMessage (final String recipients, final String message, Context context, Response.Listener<String> onResponse, Response.ErrorListener onError) {
69+
public static void sendMessage (final String recipients, final String message, final boolean hasCustomName, Context context, Response.Listener<String> onResponse, Response.ErrorListener onError) {
7070
RequestQueue queue = Volley.newRequestQueue(context);
7171
StringRequest stringRequester = new StringRequest(Request.Method.POST, API_URL + "/send", onResponse, onError) {
7272

7373
protected Map<String, String> getParams() throws com.android.volley.AuthFailureError {
7474
Map<String, String> params = new HashMap<String, String>();
7575
params.put("participants",recipients);
7676
params.put("message", message);
77+
params.put("hasCustomName",hasCustomName ? "true" : "false");
7778
params.put("t",APP_CONSTANTS.SERVER_PROTECTION_TOKEN);
7879
return params;
7980
}

0 commit comments

Comments
 (0)