Reply doesn't catch RE: in the subject line #382

Closed
opened 2013-08-07 19:05:22 +02:00 by grant-olson · 2 comments
grant-olson commented 2013-08-07 19:05:22 +02:00 (Migrated from github.com)

It only catches Re:. This caused some messages to end up with "Re: RE: RE: blah" in the subject line on the general channel.

There is already a similar check in class_receiveDataThread to account for an all-caps RE:

Attaching a diff because this is just a one liner. Let me know if you want a full Pull Request:

diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py
index 1d115af..cc57809 100644
--- a/src/bitmessageqt/__init__.py
+++ b/src/bitmessageqt/__init__.py
@@ -2345,7 +2345,7 @@ class MyForm(QtGui.QMainWindow):
         # self.ui.comboBoxSendFrom.setEditText(str(self.ui.tableWidgetInbox.item(currentInboxRow,0).text))
         self.ui.textEditMessage.setText('\n\n------------------------------------------------------\n' + self.ui.tableWidgetInbox.item(
             currentInboxRow, 2).data(Qt.UserRole).toPyObject())
-        if self.ui.tableWidgetInbox.item(currentInboxRow, 2).text()[0:3] == 'Re:':
+        if self.ui.tableWidgetInbox.item(currentInboxRow, 2).text()[0:3] in ['Re:', 'RE:']:
             self.ui.lineEditSubject.setText(
                 self.ui.tableWidgetInbox.item(currentInboxRow, 2).text())
         else:
It only catches Re:. This caused some messages to end up with "Re: RE: RE: blah" in the subject line on the general channel. There is already a similar check in class_receiveDataThread to account for an all-caps RE: Attaching a diff because this is just a one liner. Let me know if you want a full Pull Request: ``` diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 1d115af..cc57809 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -2345,7 +2345,7 @@ class MyForm(QtGui.QMainWindow): # self.ui.comboBoxSendFrom.setEditText(str(self.ui.tableWidgetInbox.item(currentInboxRow,0).text)) self.ui.textEditMessage.setText('\n\n------------------------------------------------------\n' + self.ui.tableWidgetInbox.item( currentInboxRow, 2).data(Qt.UserRole).toPyObject()) - if self.ui.tableWidgetInbox.item(currentInboxRow, 2).text()[0:3] == 'Re:': + if self.ui.tableWidgetInbox.item(currentInboxRow, 2).text()[0:3] in ['Re:', 'RE:']: self.ui.lineEditSubject.setText( self.ui.tableWidgetInbox.item(currentInboxRow, 2).text()) else: ```
nimdahk commented 2013-08-07 20:07:10 +02:00 (Migrated from github.com)

might as well lowercase it and compare it to "re:"

might as well lowercase it and compare it to "re:"
grant-olson commented 2013-08-07 21:09:38 +02:00 (Migrated from github.com)

I thought about that but this fix was more consistent with similar code in class_receiveDataThread. I have no preference, but thought they should both behave the same way if either code path see "rE: hAXXoR CAPS"

I thought about that but this fix was more consistent with similar code in class_receiveDataThread. I have no preference, but thought they should both behave the same way if either code path see "rE: hAXXoR CAPS"
This repo is archived. You cannot comment on issues.
No Milestone
No project
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Bitmessage/PyBitmessage-2024-08-21#382
No description provided.