<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=The818studios</id>
	<title>WebOS Internals - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=The818studios"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/The818studios"/>
	<updated>2026-05-31T18:46:44Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_Messaging_Forward_Messages&amp;diff=5521</id>
		<title>Patch Messaging Forward Messages</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_Messaging_Forward_Messages&amp;diff=5521"/>
		<updated>2009-09-08T10:14:10Z</updated>

		<summary type="html">&lt;p&gt;The818studios: /* Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{template:patch}}&lt;br /&gt;
'''Description:''' This mod will allow you to forward a message by simply tapping on the text of a message in the chat view.  It does not interfere with the current attachment-tapping behavior.  Tapping an attached image ask if you want to forward.  Selecting &amp;quot;No&amp;quot; will still prompt for a save, etc., while selecting &amp;quot;Yes&amp;quot; will open a the compose dialog, with the message and attachments pre-populated.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' There is a patch available for the mod.  Please see [[Applying Patches]] for instructions.&lt;br /&gt;
&lt;br /&gt;
==Step One: Create the model==&lt;br /&gt;
&lt;br /&gt;
Back up and modify /usr/palm/applications/com.palm.app.messaging/app/models/messaging-luna-service.js.&lt;br /&gt;
&lt;br /&gt;
After line 10, add the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
forwardIdentifier: 'palm://com.palm.applicationManager',&lt;br /&gt;
&lt;br /&gt;
  forwardMessage: function(sceneController,messageText,attachment) {&lt;br /&gt;
	var opts = {&lt;br /&gt;
                method: 'launch',&lt;br /&gt;
                parameters: {&lt;br /&gt;
                        id: 'com.palm.app.messaging',&lt;br /&gt;
                        params: {&lt;br /&gt;
                        }&lt;br /&gt;
                }&lt;br /&gt;
        };&lt;br /&gt;
        if (messageText)&lt;br /&gt;
                opts.parameters.params.messageText = 'FWD: '+messageText;&lt;br /&gt;
        if (attachment)&lt;br /&gt;
                opts.parameters.params.attachment = attachment;&lt;br /&gt;
        return sceneController.serviceRequest(MessagingMojoService.forwardIdentifier,opts);&lt;br /&gt;
  },&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Step Two: Make it respond to a tap on the text==&lt;br /&gt;
&lt;br /&gt;
Back up and modify /usr/palm/applications/com.palm.app.messaging/app/controllers/chatview-assistant.js&lt;br /&gt;
&lt;br /&gt;
Find the function '''handleMessageTap''', starting on line 1480:&lt;br /&gt;
&lt;br /&gt;
The first few lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
        handleMessageTap: function(event){  &lt;br /&gt;
                var eventTarget = this.controller.get(event.originalEvent.target);&lt;br /&gt;
&lt;br /&gt;
                var mmsImageTarget = MessagingUtils.getClassUpChain(eventTarget,'MMSImageObject');                                                                                 &lt;br /&gt;
                if(mmsImageTarget) {&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the last few lines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
                                                                                                                                                                                   &lt;br /&gt;
                        MessagingMojoService.getMessageErrorInfo(this.controller, messageData.messageId, messageData.flags, this.handleMessageErrorPopup.bind(this,messageData));  &lt;br /&gt;
                                                                                                                                                                                   &lt;br /&gt;
                }.bind(this), false);                                                                                                                                              &lt;br /&gt;
        },&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Replace the entire function with the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
        handleMessageTap: function(event){&lt;br /&gt;
                var eventTarget = this.controller.get(event.originalEvent.target);&lt;br /&gt;
&lt;br /&gt;
                var mmsImageTarget = MessagingUtils.getClassUpChain(eventTarget,'MMSImageObject');&lt;br /&gt;
                if(mmsImageTarget) {&lt;br /&gt;
                        var imagePath = mmsImageTarget.getAttribute('originalSrc');&lt;br /&gt;
                        this.controller.showAlertDialog({&lt;br /&gt;
                                onChoose: function(value) {if(value == &amp;quot;forward&amp;quot;){MessagingMojoService.forwardMessage(this.controller, event.item.messageText, imagePath);} else {this.controller.stageController.pushScene('imageview', imagePath);}},&lt;br /&gt;
                                title: $L(&amp;quot;Forward Message&amp;quot;),&lt;br /&gt;
                                message: $L(&amp;quot;Do you want to forward this message?&amp;quot;),&lt;br /&gt;
                                choices:[&lt;br /&gt;
                                        {label:$L(&amp;quot;Yes&amp;quot;), value:&amp;quot;forward&amp;quot;, type:&amp;quot;affirmative&amp;quot;},&lt;br /&gt;
                                        {label:$L(&amp;quot;No&amp;quot;), value:&amp;quot;&amp;quot;, type:&amp;quot;negative&amp;quot;}&lt;br /&gt;
                                ]&lt;br /&gt;
                        });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                var mmsVideoTarget = MessagingUtils.getClassUpChain(eventTarget,'mms-video');&lt;br /&gt;
                if(mmsVideoTarget) {&lt;br /&gt;
                        var videoPath = mmsVideoTarget.getAttribute('filePath');&lt;br /&gt;
                        var videoName = mmsVideoTarget.getAttribute('fileInfo');&lt;br /&gt;
&lt;br /&gt;
                        var args = {&lt;br /&gt;
                                appId: &amp;quot;com.palm.app.videoplayer&amp;quot;,&lt;br /&gt;
                                name: &amp;quot;nowplaying&amp;quot;&lt;br /&gt;
                        };&lt;br /&gt;
                        var params = {&lt;br /&gt;
                                target: videoPath,&lt;br /&gt;
                                title: videoName&lt;br /&gt;
                        };&lt;br /&gt;
                        this.controller.showAlertDialog({&lt;br /&gt;
                                onChoose: function(value) {if(value == &amp;quot;forward&amp;quot;){MessagingMojoService.forwardMessage(this.controller, event.item.messageText, videoPath);} else {this.controller.stageController.pushScene(args, params);}},&lt;br /&gt;
                                title: $L(&amp;quot;Forward Message&amp;quot;),&lt;br /&gt;
                                message: $L(&amp;quot;Do you want to forward this message?&amp;quot;),&lt;br /&gt;
                                choices:[&lt;br /&gt;
                                        {label:$L(&amp;quot;Yes&amp;quot;), value:&amp;quot;forward&amp;quot;, type:&amp;quot;affirmative&amp;quot;},&lt;br /&gt;
                                        {label:$L(&amp;quot;No&amp;quot;), value:&amp;quot;&amp;quot;, type:&amp;quot;negative&amp;quot;}&lt;br /&gt;
                                ]&lt;br /&gt;
                        });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                var mmsVcardTarget = MessagingUtils.getClassUpChain(eventTarget,'mms-vcard');&lt;br /&gt;
                if(mmsVcardTarget) {&lt;br /&gt;
                        var filePath = mmsVcardTarget.getAttribute('filePath');&lt;br /&gt;
                        this.controller.showAlertDialog({&lt;br /&gt;
                                onChoose: function(value) {if(value == &amp;quot;forward&amp;quot;){MessagingMojoService.forwardMessage(this.controller, event.item.messageText, filePath);} else {this.controller.stageController.pushScene('mmsTextAttachment', filePath);}},&lt;br /&gt;
                                title: $L(&amp;quot;Forward Message&amp;quot;),&lt;br /&gt;
                                message: $L(&amp;quot;Do you want to forward this message?&amp;quot;),&lt;br /&gt;
                                choices:[&lt;br /&gt;
                                        {label:$L(&amp;quot;Yes&amp;quot;), value:&amp;quot;forward&amp;quot;, type:&amp;quot;affirmative&amp;quot;},&lt;br /&gt;
                                        {label:$L(&amp;quot;No&amp;quot;), value:&amp;quot;&amp;quot;, type:&amp;quot;negative&amp;quot;}&lt;br /&gt;
                                ]&lt;br /&gt;
                        });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                var mmsVcalTarget = MessagingUtils.getClassUpChain(eventTarget,'mms-vcal');&lt;br /&gt;
                if(mmsVcalTarget) {&lt;br /&gt;
                        var filePath = mmsVcalTarget.getAttribute('filePath');&lt;br /&gt;
                        this.controller.showAlertDialog({&lt;br /&gt;
                                onChoose: function(value) {if(value == &amp;quot;forward&amp;quot;){MessagingMojoService.forwardMessage(this.controller, event.item.messageText, filePath);} else {this.controller.stageController.pushScene('mmsTextAttachment', filePath);}},&lt;br /&gt;
                                title: $L(&amp;quot;Forward Message&amp;quot;),&lt;br /&gt;
                                message: $L(&amp;quot;Do you want to forward this message?&amp;quot;),&lt;br /&gt;
                                choices:[&lt;br /&gt;
                                        {label:$L(&amp;quot;Yes&amp;quot;), value:&amp;quot;forward&amp;quot;, type:&amp;quot;affirmative&amp;quot;},&lt;br /&gt;
                                        {label:$L(&amp;quot;No&amp;quot;), value:&amp;quot;&amp;quot;, type:&amp;quot;negative&amp;quot;}&lt;br /&gt;
                                ]&lt;br /&gt;
                        });&lt;br /&gt;
                        return;&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                if (!mmsImageTarget &amp;amp;&amp;amp; !mmsVideoTarget &amp;amp;&amp;amp; !mmsVcardTarget &amp;amp;&amp;amp; !mmsVcalTarget) {&lt;br /&gt;
                        this.controller.showAlertDialog({&lt;br /&gt;
                                onChoose: function(value) {if(value == &amp;quot;forward&amp;quot;){MessagingMojoService.forwardMessage(this.controller, event.item.messageText, '');}},&lt;br /&gt;
                                title: $L(&amp;quot;Forward Message&amp;quot;),&lt;br /&gt;
                                message: $L(&amp;quot;Do you want to forward this message?&amp;quot;),&lt;br /&gt;
                                choices:[&lt;br /&gt;
                                        {label:$L(&amp;quot;Yes&amp;quot;), value:&amp;quot;forward&amp;quot;, type:&amp;quot;affirmative&amp;quot;},&lt;br /&gt;
                                        {label:$L(&amp;quot;No&amp;quot;), value:&amp;quot;&amp;quot;, type:&amp;quot;negative&amp;quot;}&lt;br /&gt;
                                ]&lt;br /&gt;
                        });&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                MessagingUtils.simpleListClick(this.controller.get(event.originalEvent.target), &amp;quot;chatRow&amp;quot;, function(targetRow){&lt;br /&gt;
                        var messageData = {&lt;br /&gt;
                                errorCode: targetRow.getAttribute(&amp;quot;errorCode&amp;quot;),&lt;br /&gt;
                                status: targetRow.getAttribute(&amp;quot;status&amp;quot;),&lt;br /&gt;
                                messageId: targetRow.getAttribute(&amp;quot;messageId&amp;quot;),&lt;br /&gt;
                                flags: targetRow.getAttribute(&amp;quot;flags&amp;quot;),&lt;br /&gt;
                                messageType: targetRow.getAttribute(&amp;quot;messageType&amp;quot;)&lt;br /&gt;
                        };&lt;br /&gt;
&lt;br /&gt;
                        MessagingMojoService.getMessageErrorInfo(this.controller, messageData.messageId, messageData.flags, this.handleMessageErrorPopup.bind(this,messageData));&lt;br /&gt;
&lt;br /&gt;
                }.bind(this), false);&lt;br /&gt;
        },&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reboot for changes to take effect.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
To forward a message, open the Messaging application, tap a chat thread, then tap an individual message.  A dialog will pop up asking if you would like to forward.  If the message has an attachment, it will be forwarded, as well.  A new compose card will open with the message text pre-populated.  Simply choose the recipient(s).&lt;br /&gt;
&lt;br /&gt;
= Notes =&lt;br /&gt;
Patching [[Patch Messaging Character Counter]] will not allow for this patch to work, please take a look into this.  -thatdude&lt;br /&gt;
&lt;br /&gt;
If the [[Patch Messaging Character Counter]] patch is applied manually it works fine with this patch. -NetWhiz&lt;br /&gt;
&lt;br /&gt;
Would it be possible to make this into a patch that could be installed with preware? I think this would be much appreciated by people less inclined to root their pre. -The818Studios&lt;br /&gt;
&lt;br /&gt;
= Credits=&lt;br /&gt;
Submitted by JackieRipper and Atlanta&lt;/div&gt;</summary>
		<author><name>The818studios</name></author>
	</entry>
</feed>