From 9283ce87766f1736326d0aa9c9d38ff01ae66fb2 Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Wed, 4 Sep 2013 17:33:39 -0400 Subject: [PATCH] When replying using chan address, send to whole chan not just sender --- src/bitmessageqt/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 209c7129..c17ccbca 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -2291,7 +2291,15 @@ class MyForm(QtGui.QMainWindow): else: self.ui.labelFrom.setText(toAddressAtCurrentInboxRow) self.setBroadcastEnablementDependingOnWhetherThisIsAChanAddress(toAddressAtCurrentInboxRow) + self.ui.lineEditTo.setText(str(fromAddressAtCurrentInboxRow)) + + # If the previous message was to a chan then we should send our reply to the chan rather than to the particular person who sent the message. + if shared.config.has_section(toAddressAtCurrentInboxRow): + if shared.safeConfigGetBoolean(toAddressAtCurrentInboxRow, 'chan'): + print 'original sent to a chan. Setting the to address in the reply to the chan address.' + self.ui.lineEditTo.setText(str(toAddressAtCurrentInboxRow)) + self.ui.comboBoxSendFrom.setCurrentIndex(0) # self.ui.comboBoxSendFrom.setEditText(str(self.ui.tableWidgetInbox.item(currentInboxRow,0).text)) self.ui.textEditMessage.setText('\n\n------------------------------------------------------\n' + self.ui.tableWidgetInbox.item(