Add missing file_reference argument where applicable · stack-queue/pyrogram@84fef9e · GitHub
Skip to content

Commit 84fef9e

Browse files
committed
Add missing file_reference argument where applicable
1 parent e669a6a commit 84fef9e

13 files changed

Lines changed: 51 additions & 27 deletions

pyrogram/client/client.py

Lines changed: 3 additions & 3 deletions

pyrogram/client/methods/chats/set_chat_photo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ def set_chat_photo(self,
6161
photo = types.InputChatPhoto(
6262
id=types.InputPhoto(
6363
id=s[0],
64-
access_hash=s[1]
64+
access_hash=s[1],
65+
file_reference=b""
6566
)
6667
)
6768

pyrogram/client/methods/messages/edit_message_media.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def edit_message_media(self,
8484
media = types.InputMediaPhoto(
8585
id=types.InputPhoto(
8686
id=media.photo.id,
87-
access_hash=media.photo.access_hash
87+
access_hash=media.photo.access_hash,
88+
file_reference=b""
8889
)
8990
)
9091
elif media.media.startswith("http"):
@@ -110,7 +111,8 @@ def edit_message_media(self,
110111
media = types.InputMediaPhoto(
111112
id=types.InputPhoto(
112113
id=unpacked[2],
113-
access_hash=unpacked[3]
114+
access_hash=unpacked[3],
115+
file_reference=b""
114116
)
115117
)
116118

@@ -138,7 +140,8 @@ def edit_message_media(self,
138140
media = types.InputMediaDocument(
139141
id=types.InputDocument(
140142
id=media.document.id,
141-
access_hash=media.document.access_hash
143+
access_hash=media.document.access_hash,
144+
file_reference=b""
142145
)
143146
)
144147
elif media.media.startswith("http"):
@@ -164,7 +167,8 @@ def edit_message_media(self,
164167
media = types.InputMediaDocument(
165168
id=types.InputDocument(
166169
id=unpacked[2],
167-
access_hash=unpacked[3]
170+
access_hash=unpacked[3],
171+
file_reference=b""
168172
)
169173
)
170174

@@ -191,7 +195,8 @@ def edit_message_media(self,
191195
media = types.InputMediaDocument(
192196
id=types.InputDocument(
193197
id=media.document.id,
194-
access_hash=media.document.access_hash
198+
access_hash=media.document.access_hash,
199+
file_reference=b""
195200
)
196201
)
197202
elif media.media.startswith("http"):
@@ -217,7 +222,8 @@ def edit_message_media(self,
217222
media = types.InputMediaDocument(
218223
id=types.InputDocument(
219224
id=unpacked[2],
220-
access_hash=unpacked[3]
225+
access_hash=unpacked[3],
226+
file_reference=b""
221227
)
222228
)
223229

@@ -246,7 +252,8 @@ def edit_message_media(self,
246252
media = types.InputMediaDocument(
247253
id=types.InputDocument(
248254
id=media.document.id,
249-
access_hash=media.document.access_hash
255+
access_hash=media.document.access_hash,
256+
file_reference=b""
250257
)
251258
)
252259
elif media.media.startswith("http"):
@@ -272,7 +279,8 @@ def edit_message_media(self,
272279
media = types.InputMediaDocument(
273280
id=types.InputDocument(
274281
id=unpacked[2],
275-
access_hash=unpacked[3]
282+
access_hash=unpacked[3],
283+
file_reference=b""
276284
)
277285
)
278286

@@ -294,7 +302,8 @@ def edit_message_media(self,
294302
media = types.InputMediaDocument(
295303
id=types.InputDocument(
296304
id=media.document.id,
297-
access_hash=media.document.access_hash
305+
access_hash=media.document.access_hash,
306+
file_reference=b""
298307
)
299308
)
300309
elif media.media.startswith("http"):
@@ -320,7 +329,8 @@ def edit_message_media(self,
320329
media = types.InputMediaDocument(
321330
id=types.InputDocument(
322331
id=unpacked[2],
323-
access_hash=unpacked[3]
332+
access_hash=unpacked[3],
333+
file_reference=b""
324334
)
325335
)
326336

pyrogram/client/methods/messages/send_animation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ def send_animation(self,
167167
media = types.InputMediaDocument(
168168
id=types.InputDocument(
169169
id=unpacked[2],
170-
access_hash=unpacked[3]
170+
access_hash=unpacked[3],
171+
file_reference=b""
171172
)
172173
)
173174

pyrogram/client/methods/messages/send_audio.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ def send_audio(self,
167167
media = types.InputMediaDocument(
168168
id=types.InputDocument(
169169
id=unpacked[2],
170-
access_hash=unpacked[3]
170+
access_hash=unpacked[3],
171+
file_reference=b""
171172
)
172173
)
173174

pyrogram/client/methods/messages/send_document.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ def send_document(self,
148148
media = types.InputMediaDocument(
149149
id=types.InputDocument(
150150
id=unpacked[2],
151-
access_hash=unpacked[3]
151+
access_hash=unpacked[3],
152+
file_reference=b""
152153
)
153154
)
154155

pyrogram/client/methods/messages/send_media_group.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ def send_media_group(self,
7777
media = types.InputMediaPhoto(
7878
id=types.InputPhoto(
7979
id=media.photo.id,
80-
access_hash=media.photo.access_hash
80+
access_hash=media.photo.access_hash,
81+
file_reference=b""
8182
)
8283
)
8384
else:
@@ -99,7 +100,8 @@ def send_media_group(self,
99100
media = types.InputMediaPhoto(
100101
id=types.InputPhoto(
101102
id=unpacked[2],
102-
access_hash=unpacked[3]
103+
access_hash=unpacked[3],
104+
file_reference=b""
103105
)
104106
)
105107
elif isinstance(i, pyrogram.InputMediaVideo):
@@ -127,7 +129,8 @@ def send_media_group(self,
127129
media = types.InputMediaDocument(
128130
id=types.InputDocument(
129131
id=media.document.id,
130-
access_hash=media.document.access_hash
132+
access_hash=media.document.access_hash,
133+
file_reference=b""
131134
)
132135
)
133136
else:
@@ -149,7 +152,8 @@ def send_media_group(self,
149152
media = types.InputMediaDocument(
150153
id=types.InputDocument(
151154
id=unpacked[2],
152-
access_hash=unpacked[3]
155+
access_hash=unpacked[3],
156+
file_reference=b""
153157
)
154158
)
155159

pyrogram/client/methods/messages/send_photo.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ def send_photo(self,
142142
media = types.InputMediaPhoto(
143143
id=types.InputPhoto(
144144
id=unpacked[2],
145-
access_hash=unpacked[3]
145+
access_hash=unpacked[3],
146+
file_reference=b""
146147
),
147148
ttl_seconds=ttl_seconds
148149
)

pyrogram/client/methods/messages/send_sticker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ def send_sticker(self,
127127
media = types.InputMediaDocument(
128128
id=types.InputDocument(
129129
id=unpacked[2],
130-
access_hash=unpacked[3]
130+
access_hash=unpacked[3],
131+
file_reference=b""
131132
)
132133
)
133134

pyrogram/client/methods/messages/send_video.py

Lines changed: 2 additions & 1 deletion

0 commit comments

Comments
 (0)