Skip to content

Commit 3c90ebf

Browse files
authored
Merge pull request #561 from talkjs/fix/updates-forwarding-howto
Update instructions on identifying forwarded msgs
2 parents ecec53d + 4ca98d7 commit 3c90ebf

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

howtos/how-to-add-forwarding/README.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,7 @@ To run this example project, you need:
3636
4. Select which messages can be forwarded, and who can do the forwarding. For the purposes of this guide, for **Which messages** select that the action should be available for `All messages`, and for **Action available to**, select `Everyone`.
3737
3. Add styling to distinguish forwarded messages in your theme. The following steps add a subtle but noticeable right-pointed arrow and the label *Forwarded* at the top of the message body of messages that have been forwarded.
3838
1. On the **Themes** page of your dashboard, select **Edit** for the theme that you’d like to use.
39-
2. To identify user messages that have been forwarded, in `UserMessage`, add the following inside the `<template>` part of the code, for example at the top:
40-
```html
41-
<!-- Check for forwarded messages -->
42-
<div t:if="{{ custom and custom.forwardedFrom }}" class="{{ 'forwarded' }}"></div>
43-
```
44-
3. Still in `UserMessage`, find the section where it adds the `MessageBody`, and replace it with the following, which adds `forwardedFrom="{{custom.forwardedFrom}}"` to the message body props if the message has the `forwardedFrom` custom property:
39+
2. To identify user messages that have been forwarded, go to the `UserMessage` component. Inside the `<template>` part of the code, find the section where it adds the `MessageBody`, and replace it with the following, which adds `forwardedFrom="{{custom.forwardedFrom}}"` to the message body props if the message has the `forwardedFrom` custom property:
4540
```html
4641
<MessageBody t:if="{{ custom and custom.forwardedFrom }}"
4742
body="{{ body }}"
@@ -61,10 +56,9 @@ To run this example project, you need:
6156
isLongEmailMessage="{{isLongEmailMessage}}"
6257
darkenMenuArea="{{ darkenMenuArea }}"
6358
referencedMessage="{{ referencedMessage }}"
64-
forwardedFrom="null"
6559
/>
6660
```
67-
4. Then, to style the message body of a forwarded message, go to `MessageBody` and add the following at the top inside the `<template>` section:
61+
3. Then, to style the message body of a forwarded message, go to `MessageBody` and add the following at the top inside the `<template>` section:
6862
```html
6963
<div t:if="{{ forwardedFrom }}">
7064
<div class="forwarded-header">

0 commit comments

Comments
 (0)