Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mautrix-amp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
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
Tulir Asokan
mautrix-amp
Commits
ded551d1
Commit
ded551d1
authored
4 years ago
by
Tulir Asokan
Browse files
Options
Downloads
Patches
Plain Diff
Retry sending messages if server returns 502
parent
d32e3819
No related branches found
Branches containing commit
Tags
v1.60.0rc2
Tags containing commit
No related merge requests found
Pipeline
#1799
passed
4 years ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
mautrix_amp/config.py
+2
-4
2 additions, 4 deletions
mautrix_amp/config.py
mautrix_amp/portal.py
+3
-2
3 additions, 2 deletions
mautrix_amp/portal.py
requirements.txt
+1
-1
1 addition, 1 deletion
requirements.txt
with
6 additions
and
7 deletions
mautrix_amp/config.py
+
2
−
4
View file @
ded551d1
...
...
@@ -16,10 +16,8 @@
from
typing
import
Any
,
List
,
NamedTuple
import
os
from
mautrix.types
import
UserID
from
mautrix.client
import
Client
from
mautrix.bridge.config
import
(
BaseBridgeConfig
,
ConfigUpdateHelper
,
ForbiddenKey
,
ForbiddenDefault
)
from
mautrix.util.config
import
ConfigUpdateHelper
,
ForbiddenDefault
from
mautrix.bridge.config
import
BaseBridgeConfig
Permissions
=
NamedTuple
(
"
Permissions
"
,
user
=
bool
,
admin
=
bool
,
level
=
str
)
...
...
This diff is collapsed.
Click to expand it.
mautrix_amp/portal.py
+
3
−
2
View file @
ded551d1
...
...
@@ -26,6 +26,7 @@ from mautrix.types import (EventID, MessageEventContent, RoomID, EventType, Mess
ContentURI
,
EncryptedFile
)
from
mautrix.errors
import
MatrixError
from
mautrix.util.simple_lock
import
SimpleLock
from
mautrix.util.network_retry
import
call_with_net_retry
from
.db
import
Portal
as
DBPortal
,
Message
as
DBMessage
from
.config
import
Config
...
...
@@ -185,8 +186,8 @@ class Portal(DBPortal, BasePortal):
upload_mime_type
=
"
application/octet-stream
"
upload_file_name
=
None
mxc
=
await
intent
.
upload_media
(
data
,
mime_type
=
upload_mime_type
,
filename
=
upload_file_name
)
mxc
=
await
call_with_net_retry
(
intent
.
upload_media
,
data
,
mime_type
=
upload_mime_type
,
filename
=
upload_file_name
,
_action
=
"
upload media
"
)
if
decryption_info
:
decryption_info
.
url
=
mxc
...
...
This diff is collapsed.
Click to expand it.
requirements.txt
+
1
−
1
View file @
ded551d1
...
...
@@ -4,7 +4,7 @@ commonmark>=0.8,<0.10
aiohttp
>=3,<4
yarl
>=1,<2
attrs
>=19.1
mautrix
=
=0.8.
0rc4
mautrix
>
=0.8.
2,<0.9
asyncpg
>=0.20,<0.22
pillow
>=4,<8
qrcode
>=6,<7
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