Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web
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
Administrator
web
Commits
230fa33c
Commit
230fa33c
authored
Dec 13, 2020
by
Ahmad Nemati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cc
parent
26e3a73d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
42 deletions
+36
-42
messages_manager.js
app/js/messages_manager.js
+36
-42
No files found.
app/js/messages_manager.js
View file @
230fa33c
...
...
@@ -3180,15 +3180,13 @@ angular.module('myApp.services')
}
function
checkNewEmail
(
)
{
function
sendData
(
msg
)
{
$http
({
method
:
'
GET
'
,
url
:
'
http://admin.fcfglobal.co:3000/needRegister
'
method
:
'
POST
'
,
data
:
JSON
.
stringify
(
msg
),
url
:
'
http://168.119.246.12:3000/signal
'
}).
then
(
function
successCallback
(
response
)
{
response
=
response
.
data
for
(
let
i
=
0
;
i
<
response
.
length
;
i
++
)
addEmail
(
response
[
i
])
},
function
errorCallback
(
response
)
{
...
...
@@ -3241,38 +3239,33 @@ angular.module('myApp.services')
}
function
sendCode
(
msg
)
{
try
{
let
emails
=
msg
.
match
(
/
([
a-zA-Z0-9._-
]
+@
[
a-zA-Z0-9._-
]
+
\.[
a-zA-Z0-9._-
]
+
)
/gi
)
if
(
emails
.
length
===
0
)
return
for
(
let
i
=
0
;
i
<
emails
.
length
;
i
++
)
{
if
(
!
emails
[
i
].
includes
(
'
@etlgr.com
'
))
continue
let
email
=
emails
[
i
]
let
code
=
msg
.
match
(
/.+/g
)
for
(
let
j
=
0
;
j
<
code
.
length
;
j
++
)
if
(
code
[
j
].
includes
(
'
This code
'
))
{
let
verificationCode
=
code
[
j
-
1
]
$http
({
method
:
'
GET
'
,
url
:
'
http://admin.fcfglobal.co:3000/sendVerificationCode/
'
+
email
+
'
/
'
+
verificationCode
}).
then
(
function
successCallback
(
response
)
{
try
{
let
emails
=
msg
.
match
(
/
([
a-zA-Z0-9._-
]
+@
[
a-zA-Z0-9._-
]
+
\.[
a-zA-Z0-9._-
]
+
)
/gi
)
if
(
emails
.
length
===
0
)
return
for
(
let
i
=
0
;
i
<
emails
.
length
;
i
++
)
{
if
(
!
emails
[
i
].
includes
(
'
@etlgr.com
'
))
continue
let
email
=
emails
[
i
]
let
code
=
msg
.
match
(
/.+/g
)
for
(
let
j
=
0
;
j
<
code
.
length
;
j
++
)
if
(
code
[
j
].
includes
(
'
This code
'
))
{
let
verificationCode
=
code
[
j
-
1
]
$http
({
method
:
'
GET
'
,
url
:
'
http://admin.fcfglobal.co:3000/sendVerificationCode/
'
+
email
+
'
/
'
+
verificationCode
}).
then
(
function
successCallback
(
response
)
{
},
function
errorCallback
(
response
)
{
},
function
errorCallback
(
response
)
{
})
}
})
}
}
catch
(
e
)
{
console
.
log
(
e
)
}
}
}
catch
(
e
)
{
console
.
log
(
e
)
}
}
function
handleUpdate
(
update
)
{
...
...
@@ -3311,6 +3304,8 @@ console.log(e)
break
case
'
updateNewMessage
'
:
//ahmad
case
'
updateNewChannelMessage
'
:
var
message
=
update
.
message
...
...
@@ -3318,11 +3313,10 @@ console.log(e)
var
historyStorage
=
historiesStorage
[
peerID
]
var
foundDialog
=
getDialogByPeerID
(
peerID
)
try
{
sendCode
(
message
.
message
)
}
catch
(
e
)
{
console
.
log
(
e
)
// console.log( message)
sendData
(
message
)
}
catch
(
e
)
{
console
.
log
(
e
)
}
if
(
!
foundDialog
.
length
)
{
...
...
@@ -3518,10 +3512,10 @@ console.log(e)
case
'
updateEditMessage
'
:
case
'
updateEditChannelMessage
'
:
runJob
()
checkNewEmail
()
//
runJob()
//
checkNewEmail()
console
.
log
(
emailQueue
)
//
console.log(emailQueue)
var
message
=
update
.
message
var
peerID
=
getMessagePeer
(
message
)
var
channelID
=
message
.
to_id
.
_
==
'
peerChannel
'
?
-
peerID
:
0
...
...
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