Knugi
0056204d87
Merge pull request #206 from tang-vu/contribai/improve/quality/crash-in-timestamp-formatting-when-timez
...
✨ Quality: Crash in timestamp formatting when timezone_offset is None
2026-03-26 21:56:43 +08:00
KnugiHK
9e138d3a1f
Cache TimeZone object in Timing class
2026-03-26 21:31:52 +08:00
KnugiHK
18a0d822b3
Timezone offset should also accepts float
2026-03-26 21:30:10 +08:00
KnugiHK
bb860533d5
Add a default value for timezone_offset in Timing.__init__
2026-03-26 21:23:59 +08:00
Tang Vu
a2bcc39e63
refactor: crash in timestamp formatting when timezone_offset is none
...
In `Timing.format_timestamp`, if `self.timezone_offset` is `None` (which is explicitly allowed by the `Optional[int]` type hint), it instantiates `TimeZone(None)`.
When `datetime.fromtimestamp()` calls the `utcoffset()` method on this timezone object, it executes `timedelta(hours=self.offset)`, which evaluates to `timedelta(hours=None)`. This raises a `TypeError: unsupported type for timedelta hours component: NoneType`, causing the application to crash during export.
Affected files: data_model.py
Signed-off-by: Tang Vu <vuminhtang2212@gmail.com >
2026-03-26 03:25:44 +07:00
KnugiHK
daf6375966
Implement aliases for chat. For LID mapping
2026-03-21 15:36:32 +08:00
Ingolf Becker
99474e65cc
iOS: Add poll support, fix contact name resolution, fix typos
...
- Add poll message decoding for iOS (ZMESSAGETYPE 46) using raw protobuf
parsing of ZWAMESSAGEINFO.ZRECEIPTINFO blobs (no external dependency).
Polls render with vote tallies and voter names in the HTML export.
- Fix iOS contact name resolution: pull ZFULLNAME from address book,
resolve LID-based group members, fall back to ZWAPROFILEPUSHNAME,
and avoid overwriting real names with phone numbers.
- Fix typo: 'expoter' -> 'exporter' in android_crypt.py and __main__.py.
- Add poll field to Message data model and update test fixtures.
2026-02-22 17:44:22 +08:00
KnugiHK
7dbd0dbe3c
Add preflight check to see if transciption column exists
2026-01-19 22:46:30 +08:00
Knugi
f2b6a39011
Merge branch 'dev' into feature/export-reactions
2026-01-19 20:38:20 +08:00
KnugiHK
ea9675973c
Refactor Message class to accept pre-initialized Timing object
...
Pass the `Timing` object directly through `timezone_offset` to avoid repeated initialization of the same object within the `Message` class.
2026-01-17 13:42:11 +08:00
Cosmo
75fcf33fda
feat: Add support for exporting message reactions
2026-01-11 07:06:23 -08:00
KnugiHK
667c005a67
Make received_ & read_timestamp optional
2025-05-11 17:49:51 +08:00
KnugiHK
ae6e8ba7e2
Make to_ & from_json functions dynamic
...
This is to prevent error like #150 in the future
2025-05-11 17:46:00 +08:00
KnugiHK
a58dd78be8
PEP8
2025-05-05 17:13:43 +08:00
KnugiHK
4e1d994aa5
Add message_type when importing json
2025-05-05 17:10:57 +08:00
KnugiHK
4ca56b1c5c
Bug fix on wrong type of self.message_type
2025-05-05 17:08:35 +08:00
KnugiHK
75c2db6d5c
Accept both raw timestamp and formatted time string
2025-05-05 16:13:48 +08:00
KnugiHK
352be849a7
Bug fix on messages with timestamp being '0'
2025-05-05 16:13:17 +08:00
KnugiHK
3e3aeae7ad
key_id can also be a string
2025-05-05 16:12:57 +08:00
KnugiHK
9d76cf60af
Attach media_base from JSON
2025-05-05 16:12:13 +08:00
KnugiHK
eded9a140f
Add new attributes to JSON
2025-05-05 16:11:10 +08:00
KnugiHK
534aea924d
Add docs
2025-05-05 15:20:14 +08:00
fschuh
2f15360526
Fixed remaining compatibility issues with latest code
2025-05-04 15:58:02 -04:00
fschuh
1207b1e0cc
Added support for incremental merging
2025-04-29 01:22:11 -04:00
KnugiHK
8c9c43ef38
Merge branch 'dev' into refactoring
2025-03-02 13:35:13 +08:00
KnugiHK
1bb3f2ccea
Skip generating chats that do not contain any message
2025-03-02 13:06:45 +08:00
KnugiHK
7c4705d149
Major refactoring
...
This commit does not refactor Android handler
2025-03-02 12:57:27 +08:00
KnugiHK
1ef223e238
Refactor the data model
2025-03-02 01:41:44 +08:00
KnugiHK
9f321384ec
Make ChatStore.messages private
2025-03-02 00:52:28 +08:00
KnugiHK
4d04e51dda
Refactor and add docstrings
2025-03-02 00:47:34 +08:00
KnugiHK
86cb44ced9
Add more docstrings
2025-03-02 00:28:47 +08:00
KnugiHK
cfe04c8c0b
Display the metadata from the messages sent by "me" ( #69 )
...
For now, only the time for "delivered" (android & ios) and "read" (android only) is support.
2025-02-09 18:44:18 +08:00
KnugiHK
bfd172031c
Distinguish between regular video and GIF ( #103 )
2025-02-09 13:54:48 +08:00
KnugiHK
b0942d695b
Add base tag to reduce the output size ( #103 )
2024-06-30 19:17:45 +08:00
KnugiHK
3d155fb48f
Bug fix on wrong timestamp variable
2023-12-17 14:37:59 +08:00
KnugiHK
94956913e8
Add time zone offset to display time
2023-12-03 20:35:58 +08:00
KnugiHK
f81f31d667
Fix attempt to #64
2023-12-03 14:19:49 +08:00
KnugiHK
8dec2a7e97
Bug fix on missing attribute in the Message class.
2023-06-25 13:30:44 +08:00
KnugiHK
40d060628f
Coding style
2023-06-21 17:04:58 +08:00
KnugiHK
032af6cdcf
Refactor
2023-06-21 17:01:14 +08:00
KnugiHK
136152dc18
Add contact's status if present (Android)
2023-06-20 14:07:42 +08:00
KnugiHK
672b85474e
Bug fix on the wrong type of media_wa_type in old Android schema
2023-06-19 20:26:13 +08:00
KnugiHK
fff11b26a5
Store the device type
2023-06-16 19:12:06 +08:00
KnugiHK
fa66ef3a52
Output all attribute to JSON file
2023-06-16 19:11:55 +08:00
KnugiHK
be9e790b12
Better handling of binary message #44
2023-06-16 01:25:51 +08:00
KnugiHK
88ef4989fc
Fix wrong error message
2023-06-15 17:00:34 +08:00
KnugiHK
f7f6b01c86
Resize sticker
2023-06-15 16:59:54 +08:00
KnugiHK
a49a911e03
Replace image rendered in the HTML to thumbnail if possible
2023-06-15 16:19:35 +08:00
KnugiHK
e0c2cf5f66
Implement iOS avatar #48
2023-06-13 19:44:16 +08:00
KnugiHK
0280325b4a
Bug fix
2023-06-11 00:47:11 +08:00