diff --git a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java index 5998f1520..a49cbd909 100644 --- a/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java +++ b/astrid/plugin-src/com/todoroo/astrid/actfm/sync/ActFmSyncService.java @@ -398,6 +398,25 @@ public final class ActFmSyncService { } } + if (values.containsKey(Task.SHARED_WITH.name)) { + try { + JSONObject sharedWith = new JSONObject(task.getValue(Task.SHARED_WITH)); + if (sharedWith.has("p")) { + JSONArray people = sharedWith.getJSONArray("p"); + for (int i = 0; i < people.length(); i++) { + params.add("share_with[]"); params.add(people.getString(i)); + } + if (sharedWith.has("message")) { + String message = sharedWith.getString("message"); + if (!TextUtils.isEmpty(message)) + params.add("message"); params.add(message); + } + } + } catch (JSONException e) { + Log.e("Error parsing shared_with", task.getValue(Task.SHARED_WITH), e); + } + } + if(Flags.checkAndClear(Flags.TAGS_CHANGED) || newlyCreated) { TodorooCursor cursor = TagService.getInstance().getTags(task.getId(), false); try { diff --git a/astrid/src/com/todoroo/astrid/ui/PeopleContainer.java b/astrid/src/com/todoroo/astrid/ui/PeopleContainer.java index 3e93d0503..19bd1a3df 100644 --- a/astrid/src/com/todoroo/astrid/ui/PeopleContainer.java +++ b/astrid/src/com/todoroo/astrid/ui/PeopleContainer.java @@ -17,6 +17,7 @@ import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.inputmethod.EditorInfo; +import android.widget.EditText; import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView; @@ -236,6 +237,10 @@ public class PeopleContainer extends LinearLayout { if(peopleList.length() > 0) sharedWith.put("p", peopleList); + EditText message = (EditText) findViewById(R.id.message); + if (message.getText().length() > 0) + sharedWith.put("message", message.getText().toString()); + return sharedWith; }