|
22 | 22 | STREAM_TOPIC_SEPARATOR, TIME_MENTION_MARKER,
|
23 | 23 | )
|
24 | 24 | from zulipterminal.helper import (
|
25 |
| - Message, absolute_url_of_message, format_string, match_emoji, match_group, |
26 |
| - match_stream, match_topics, match_user, |
| 25 | + Message, absolute_url_of_message, format_string, get_unused_fence, |
| 26 | + match_emoji, match_group, match_stream, match_topics, match_user, |
27 | 27 | )
|
28 | 28 | from zulipterminal.ui_tools.buttons import EditModeButton
|
29 | 29 | from zulipterminal.ui_tools.tables import render_table
|
@@ -1200,16 +1200,16 @@ def keypress(self, size: urwid_Size, key: str) -> Optional[str]:
|
1200 | 1200 | # ```quote
|
1201 | 1201 | # message_content
|
1202 | 1202 | # ```
|
1203 |
| - quote = '@_**{}|{}** '.format(self.message['sender_full_name'], |
1204 |
| - self.message['sender_id']) |
1205 |
| - |
1206 |
| - # FIXME: The type and generation of link needs to be discussed. |
1207 |
| - # For interoperability webapp link should be given, but |
1208 |
| - # that would not narrow to the quoted message inside ZT. |
1209 | 1203 | absolute_url = absolute_url_of_message(self.model, self.message)
|
1210 |
| - quote += '[said]({}):\n'.format(absolute_url) |
1211 |
| - quote += '```quote\n' + self.model.client.get_raw_message( |
1212 |
| - self.message['id'])['raw_content'] + '\n```\n' |
| 1204 | + fence = get_unused_fence(self.model.client.get_raw_message( |
| 1205 | + self.message['id'])['raw_content']) |
| 1206 | + |
| 1207 | + quote = '@_**{0}|{1}** [said]({2}):\n{3}quote\n{4}\n{3}\n'.format( |
| 1208 | + self.message['sender_full_name'], |
| 1209 | + self.message['sender_id'], absolute_url, fence, |
| 1210 | + self.model.client.get_raw_message( |
| 1211 | + self.message['id'])['raw_content']) |
| 1212 | + |
1213 | 1213 | self.model.controller.view.write_box.msg_write_box.set_edit_text(
|
1214 | 1214 | quote)
|
1215 | 1215 | self.model.controller.view.write_box.msg_write_box.set_edit_pos(
|
|
0 commit comments