Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
facebook
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
mautrix
facebook
Commits
7213f9bf
Commit
7213f9bf
authored
4 years ago
by
Tulir Asokan
Browse files
Options
Downloads
Patches
Plain Diff
Fix Matrix->Facebook read receipts
parent
60d881ca
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mautrix_facebook/matrix.py
+1
-1
1 addition, 1 deletion
mautrix_facebook/matrix.py
mautrix_facebook/portal.py
+3
-1
3 additions, 1 deletion
mautrix_facebook/portal.py
with
4 additions
and
2 deletions
mautrix_facebook/matrix.py
+
1
−
1
View file @
7213f9bf
...
@@ -225,7 +225,7 @@ class MatrixHandler(BaseMatrixHandler):
...
@@ -225,7 +225,7 @@ class MatrixHandler(BaseMatrixHandler):
if
not
portal
:
if
not
portal
:
return
return
timestamp
=
datetime
.
utc
fromtimestamp
(
data
.
get
(
"
ts
"
,
int
(
time
.
time
()
*
1000
))
/
1000
)
timestamp
=
datetime
.
fromtimestamp
(
data
.
get
(
"
ts
"
,
int
(
time
.
time
()
*
1000
))
/
1000
)
await
user
.
client
.
mark_as_read
([
portal
.
thread_for
(
user
)],
at
=
timestamp
)
await
user
.
client
.
mark_as_read
([
portal
.
thread_for
(
user
)],
at
=
timestamp
)
def
filter_matrix_event
(
self
,
evt
:
Event
)
->
bool
:
def
filter_matrix_event
(
self
,
evt
:
Event
)
->
bool
:
...
...
This diff is collapsed.
Click to expand it.
mautrix_facebook/portal.py
+
3
−
1
View file @
7213f9bf
...
@@ -569,6 +569,9 @@ class Portal(BasePortal):
...
@@ -569,6 +569,9 @@ class Portal(BasePortal):
event_ids
=
[
await
self
.
_handle_facebook_text
(
intent
,
message
)]
event_ids
=
[
await
self
.
_handle_facebook_text
(
intent
,
message
)]
else
:
else
:
self
.
log
.
warning
(
f
"
Unhandled Messenger message:
{
message
}
"
)
self
.
log
.
warning
(
f
"
Unhandled Messenger message:
{
message
}
"
)
return
if
event_ids
:
self
.
_last_bridged_mxid
=
event_ids
[
-
1
]
DBMessage
.
bulk_create
(
fbid
=
message
.
id
,
fb_receiver
=
self
.
fb_receiver
,
mx_room
=
self
.
mxid
,
DBMessage
.
bulk_create
(
fbid
=
message
.
id
,
fb_receiver
=
self
.
fb_receiver
,
mx_room
=
self
.
mxid
,
event_ids
=
[
event_id
for
event_id
in
event_ids
if
event_id
])
event_ids
=
[
event_id
for
event_id
in
event_ids
if
event_id
])
await
source
.
client
.
mark_as_delivered
(
message
)
await
source
.
client
.
mark_as_delivered
(
message
)
...
@@ -655,7 +658,6 @@ class Portal(BasePortal):
...
@@ -655,7 +658,6 @@ class Portal(BasePortal):
else
:
else
:
self
.
log
.
warning
(
f
"
Unsupported attachment type:
{
attachment
}
"
)
self
.
log
.
warning
(
f
"
Unsupported attachment type:
{
attachment
}
"
)
return
None
return
None
self
.
_last_bridged_mxid
=
event_id
return
event_id
return
event_id
async
def
_convert_facebook_location
(
self
,
intent
:
IntentAPI
,
async
def
_convert_facebook_location
(
self
,
intent
:
IntentAPI
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment