Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'gajim/gtk/menus.py')
-rw-r--r--gajim/gtk/menus.py19
1 files changed, 17 insertions, 2 deletions
diff --git a/gajim/gtk/menus.py b/gajim/gtk/menus.py
index 419d3aa1c..c7b32730a 100644
--- a/gajim/gtk/menus.py
+++ b/gajim/gtk/menus.py
@@ -705,9 +705,24 @@ def get_chat_row_menu(contact: types.ChatContactT,
show_quote = not self_contact.role.is_visitor
else:
show_quote = False
+
if show_quote:
- menu_items.append((
- p_('Message row action', 'Quote…'), 'win.quote', text))
+ if isinstance(contact, GroupchatContact) and stanza_id is None:
+ # Use XEP-0393 quotes for MUCs without XEP-0359 IDs
+ menu_items.append((
+ p_('Message row action', 'Quote…'), 'win.quote', text))
+ else:
+ if isinstance(contact, GroupchatContact):
+ reply_to_id = stanza_id
+ resource_contact = contact.get_resource(name)
+ jid = str(resource_contact.real_jid or resource_contact.jid)
+ else:
+ reply_to_id = message_id
+ jid = contact.jid.bare
+ menu_items.append((
+ p_('Message row action', 'Reply…'),
+ 'win.reply',
+ GLib.Variant('as', [reply_to_id, jid])))
show_correction = False
if message_id is not None: