Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
9889da8a
Commit
9889da8a
authored
Jun 30, 2010
by
Luci Stanescu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed normalization of phone numbers to only apply to phone numbers
parent
11b4749b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
sessions.py
blink/sessions.py
+5
-3
No files found.
blink/sessions.py
View file @
9889da8a
...
...
@@ -1674,6 +1674,7 @@ class SessionManager(object):
implements
(
IObserver
)
number_strip_re
=
re
.
compile
(
r'\(\s?0\s?\)|[-() ]'
)
number_re
=
re
.
compile
(
r'^\+?[-\d\s()]+$'
)
def
__init__
(
self
):
self
.
main_window
=
None
...
...
@@ -1782,9 +1783,10 @@ class SessionManager(object):
@
classmethod
def
normalize_number
(
cls
,
account
,
address
):
address
=
cls
.
number_strip_re
.
sub
(
''
,
address
)
if
isinstance
(
account
,
Account
)
and
account
.
pstn
.
idd_prefix
is
not
None
:
address
=
re
.
sub
(
r'^\+'
,
account
.
pstn
.
idd_prefix
,
address
)
if
cls
.
number_re
.
match
(
address
):
address
=
cls
.
number_strip_re
.
sub
(
''
,
address
)
if
isinstance
(
account
,
Account
)
and
account
.
pstn
.
idd_prefix
is
not
None
:
address
=
re
.
sub
(
r'^\+'
,
account
.
pstn
.
idd_prefix
,
address
)
return
address
def
_remove_session
(
self
,
session
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment