You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add `formattedText` or similar optional parameters in several methods:
2
+
3
+
* RelationService:
4
+
* editTextMessage
5
+
* editReply
6
+
* replyToMessage
7
+
* SendService:
8
+
* sendQuotedTextMessage
9
+
10
+
This allows us to send any HTML formatted text message without needing to rely on automatic Markdown > HTML translation. All these new parameters have a `null` value by default, so previous calls to these API methods remain compatible.
Copy file name to clipboardExpand all lines: matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/room/model/relation/RelationService.kt
+8-2
Original file line number
Diff line number
Diff line change
@@ -91,14 +91,16 @@ interface RelationService {
91
91
* Edit a text message body. Limited to "m.text" contentType.
92
92
* @param targetEvent The event to edit
93
93
* @param msgType the message type
94
-
* @param newBodyText The edited body
94
+
* @param newBodyText The edited body in plain text
95
+
* @param newFormattedBodyText The edited body with format
95
96
* @param newBodyAutoMarkdown true to parse markdown on the new body
96
97
* @param compatibilityBodyText The text that will appear on clients that don't support yet edition
97
98
*/
98
99
funeditTextMessage(
99
100
targetEvent:TimelineEvent,
100
101
msgType:String,
101
102
newBodyText:CharSequence,
103
+
newFormattedBodyText:CharSequence? = null,
102
104
newBodyAutoMarkdown:Boolean,
103
105
compatibilityBodyText:String = "* $newBodyText"
104
106
): Cancelable
@@ -108,13 +110,15 @@ interface RelationService {
108
110
* This method will take the new body (stripped from fallbacks) and re-add them before sending.
109
111
* @param replyToEdit The event to edit
110
112
* @param originalTimelineEvent the message that this reply (being edited) is relating to
111
-
* @param newBodyText The edited body (stripped from in reply to content)
113
+
* @param newBodyText The plain text edited body (stripped from in reply to content)
114
+
* @param newFormattedBodyText The formatted edited body (stripped from in reply to content)
112
115
* @param compatibilityBodyText The text that will appear on clients that don't support yet edition
113
116
*/
114
117
funeditReply(
115
118
replyToEdit:TimelineEvent,
116
119
originalTimelineEvent:TimelineEvent,
117
120
newBodyText:String,
121
+
newFormattedBodyText:String? = null,
118
122
compatibilityBodyText:String = "* $newBodyText"
119
123
): Cancelable
120
124
@@ -133,13 +137,15 @@ interface RelationService {
133
137
* by the sdk into pills.
134
138
* @param eventReplied the event referenced by the reply
135
139
* @param replyText the reply text
140
+
* @param replyFormattedText the reply text, formatted
136
141
* @param autoMarkdown If true, the SDK will generate a formatted HTML message from the body text if markdown syntax is present
137
142
* @param showInThread If true, relation will be added to the reply in order to be visible from within threads
138
143
* @param rootThreadEventId If show in thread is true then we need the rootThreadEventId to generate the relation
Copy file name to clipboardExpand all lines: matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/relation/DefaultRelationService.kt
+7-2
Original file line number
Diff line number
Diff line change
@@ -105,19 +105,21 @@ internal class DefaultRelationService @AssistedInject constructor(
Copy file name to clipboardExpand all lines: matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/room/send/LocalEchoEventFactory.kt
+15-8
Original file line number
Diff line number
Diff line change
@@ -124,19 +124,23 @@ internal class LocalEchoEventFactory @Inject constructor(
0 commit comments