Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reply Text/sms placeholders #382

Closed
gar-onn opened this issue Jul 15, 2021 · 7 comments
Closed

reply Text/sms placeholders #382

gar-onn opened this issue Jul 15, 2021 · 7 comments
Labels
Difficulty 1 Good for Contributor: Difficulty Level 1 enhancement Proposal for enhancing existing functions
Projects

Comments

@gar-onn
Copy link

gar-onn commented Jul 15, 2021

I can't get placeholders to work for SMS destination.
Would there be an option to create an option to reply to a sender.
An alternative would be for the value "000" (or other) to be automatically set to the placeholder <<sender>>.

@beardhatcode
Copy link

It likely will suffice to adjust this file such that placholders also looks for placeholders in the destination part and that applyDynamics also affects the destination.

@Nullable
@Override
public Set<String> placeholders() {
return Utils.extractPlaceholder(content);
}
@NonNull
@Override
public OperationData applyDynamics(SolidDynamicsAssignment dynamicsAssignment) {
String new_content = Utils.applyDynamics(content, dynamicsAssignment);
return new SmsOperationData(destination, new_content);
}

@renyuneyun
Copy link
Owner

Thanks for spotting that. Indeed that should be possible.
I'll work on that when I have time (sorry, time is really a constraint for me recently...). But it should be simple.

@renyuneyun renyuneyun added Difficulty 1 Good for Contributor: Difficulty Level 1 enhancement Proposal for enhancing existing functions labels Aug 15, 2021
@renyuneyun
Copy link
Owner

Hi, v0.8.2.1-beta (published just now) would probably solved this. (There would be a delay for it to appear on f-droid.)
Please have a test and report back if you are interested :)

Otherwise, I'll close this issue in a few weeks.

@gar-onn
Copy link
Author

gar-onn commented Sep 19, 2021

Hi,

This still doesn't seem to work, since placeholders can't be inputted in the sms field. See image.

I would suggest trying the following script since "N" can be inputted.

sed -i 's/destination\.raw/\0.repalce(".*NNN.*","<<sender>>")/g' app/src/main/java/ryey/easer/skills/operation/send_sms/*.java

The placeholders in content work

Screenshot_20210919-142936

@beardhatcode
Copy link

@gar-onn , The solution you propose is likely device specific.

  • Have you tried pasting the text "<<sender>>" in the field.
  • Have you tried switching keyboards to insert the text?

@gar-onn
Copy link
Author

gar-onn commented Sep 21, 2021

I have tried these things, even pasting text in the field, which doesn't work. But I wouldn't suggest allowing text in the number input field, since these might cause other issues.

Another option would be a checkbox in the profile, or an return sms option in the list.

@renyuneyun
Copy link
Owner

@gar-onn Thanks for the information.
That is probably because of the format specification/check for the receiver field to be numbers only.
I'll try to see if that is the case, and change it accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty 1 Good for Contributor: Difficulty Level 1 enhancement Proposal for enhancing existing functions
Projects
Roadmap
Awaiting triage
Development

No branches or pull requests

3 participants