message / chat: 'msg_id()' now returns 'file_path.stem' (removed suffix)
This commit is contained in:
@@ -543,10 +543,11 @@ class Message():
|
||||
def msg_id(self) -> str:
|
||||
"""
|
||||
Returns an ID that is unique throughout all messages in the same (DB) directory.
|
||||
Currently this is the file name. The ID is also used for sorting messages.
|
||||
Currently this is the file name without suffix. The ID is also used for sorting
|
||||
messages.
|
||||
"""
|
||||
if self.file_path:
|
||||
return self.file_path.name
|
||||
return self.file_path.stem
|
||||
else:
|
||||
raise MessageError("Can't create file ID without a file path")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user