Closed
Bug 1122174
Opened 10 years ago
Closed 10 years ago
Access a SMS thread via URL
Categories
(Firefox OS Graveyard :: Gaia::SMS, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1162030
People
(Reporter: kgrandon, Unassigned)
References
Details
(Whiteboard: [sms-most-wanted])
Attachments
(1 file)
In order to search for sms threads via Rocketbar, we would like to have a way of accessing a SMS thread by URL. Once we are able to do so, we can store the URL and metadata in the places datastore.
Comment 1•10 years ago
|
||
With this small patch and using this URL: app://sms.gaiamobile.org/#thread&id=10 this works fine :)
Needs unit tests !
In Bug 1011089 we should change the hash when changing panel.
Comment 2•10 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #1)
> Created attachment 8549927 [details] [review]
> Github PR
>
> With this small patch and using this URL:
> app://sms.gaiamobile.org/#thread&id=10 this works fine :)
>
> Needs unit tests !
and clean up of course, this is quick and dirty.
For example I'd do a "MessageManager.getThreadFromId" that would do both the search and the registerMessage call.
| Reporter | ||
Comment 3•10 years ago
|
||
That was quick :) I think one thing that might be nice would be to define a common URL structure to use across apps. I think this would be extremely helpful when doing cross-app development in gaia, and help keep things sane. If we want to use a hash, this could look something like:
app://origin#object/action/param:value
In the SMS case, this could look like: app://sms.gaiamobile.org/index.html#thread/view/id/10
Maybe a calendar event could have: app://calendar.gaiamobile.org/index.html#event/view/id/12345 or app://calendar.gaiamobile.org/index.html#account/edit/id/12345
This is just a quick thought, and may not be the most ideal. I do think there would be a lot of benefit in creating a standardized URL structure.
| Reporter | ||
Comment 4•10 years ago
|
||
Oops, in that example code I did <paramKey>/<paramValue>. It could be that, or delimited with colons. I've seen both work well.
Comment 5•10 years ago
|
||
I used this format because the code was already done to support this format ;) but yeah, any format woud work for me, we just need to define one.
Updated•10 years ago
|
Whiteboard: [sms-most-wanted]
| Reporter | ||
Comment 6•10 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #5)
> I used this format because the code was already done to support this format
> ;) but yeah, any format woud work for me, we just need to define one.
Sounds good. Let me spend some time in the parent bug (bug 1122171) suggesting a format and getting feedback from people.
Comment 7•10 years ago
|
||
I'm putting the fix I did here to my patch in bug 1162030, do duping.
Once we settle on a format, we can change how we generate/parse URLs.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•