Skip to content

Commit 2b185c8

Browse files
committed
release 3.3.12
1 parent b2ae404 commit 2b185c8

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [3.3.11] - 2024-08-8
8+
## [3.3.12] - 2024-08-8
99

1010
- Update privateNumber
1111
- Update senderName

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "telstra.messaging"
3-
version = "3.3.11"
3+
version = "3.3.12"
44
readme = "README.md"
55
description = "SDK for the Telstra Messaging API V3 - Beta"
66
license = "Apache-2.0"

telstra/messaging/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Messaging."""
22

3-
__version__ = "3.3.11"
3+
__version__ = "3.3.12"

telstra/messaging/message.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class TMessages:
113113

114114

115115
_VALID_FROM = re.compile(
116-
r"^(?!\d+$)(?![ _.-&])(?!.*[ _.-&]{2})(?!.*[ _.-&]$)(?!.*&.*&)[A-Za-z0-9 _.\-&]{3,11}$"
116+
r"^(?!\d+$)(?![ _.\-&])(?!.*[ _.\-&]{2})(?!.*[ _.\-&]$)(?!.*&.*&)[A-Za-z0-9 _.\-&]{3,11}$"
117117
)
118118

119119

@@ -144,11 +144,16 @@ def _send_validate_to(to: typing.Union[types.TTo, typing.List[types.TTo]]) -> No
144144

145145
def _send_validate_from(from_: typing.Optional[types.TFrom]) -> None:
146146
"""Validate the from_ parameter for send."""
147+
147148
if not isinstance(from_, str):
148149
raise exceptions.MessageError(
149150
'the value of "from_" is not valid, expected a string, received '
150151
f'"{from_}"'
151152
)
153+
154+
if from_.startswith("04"):
155+
return
156+
152157
if len(from_) > 13:
153158
raise exceptions.MessageError(
154159
'the value of "from_" has too many characters, expected at most 13'

0 commit comments

Comments
 (0)